Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>TODO supply a title</title>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <style>
- div {
- width: 100px;
- height: 100px;
- background: red;
- position: relative;
- animation: 2s myanim;
- animation-iteration-count: 10;
- -webkit-animation: 2s myanim;
- -webkit-animation-iteration-count: 10;
- }
- @keyframes myanim {
- 0% {
- left: 0px;
- top: 0px;
- }
- 25% {
- left: 100px;
- top: 0px;
- }
- 50% {
- left: 200px;
- top: 0px;
- }
- 75% {
- left: 100px;
- top: 0px;
- }
- 100% {
- left: 0px;
- top: 0px;
- }
- }
- @-webkit-keyframes myanim {
- 0% {
- left: 0px;
- top: 0px;
- }
- 25% {
- left: 100px;
- top: 0px;
- }
- 50% {
- left: 200px;
- top: 0px;
- }
- 75% {
- left: 100px;
- top: 0px;
- }
- 100% {
- left: 0px;
- top: 0px;
- }
- }
- </style>
- </head>
- <body>
- <div class="container">
- <div class="transformed">
- 3차원 변환되는 박스이다.<br/>
- backface-visibility는 후면을 보이게 하는 속성이다.<br/>
- transform-origin은 변환에서 거리를 설정한다.<br/>
- rotateY()는 Y축을 중심으로 하는 회전 변환이다.<br/>
- rotateX()는 X축을 중심으로 하는 화전 변환이다.
- </div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment