asimryu

css 애니메이션 여러 예제

Jun 3rd, 2015
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 0.80 KB | None | 0 0
  1. <!doctype html>
  2. <html lang="ko">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <title>Document</title>
  6.     <style>
  7.         img {
  8.             border-radius: 100px;
  9.         }
  10.         img:hover {
  11.             animation-duration: 2s;
  12.             animation-name: myani4;        
  13.         }
  14.         @keyframes myani {
  15.             from {
  16.                 transform:rotate(0deg);
  17.             }
  18.             to {
  19.                 transform:rotate(360deg);
  20.             }
  21.         }
  22.         @keyframes myani2 {
  23.             from {
  24.                 opacity: 1;
  25.             }
  26.             to {
  27.                 opacity: 0;
  28.             }
  29.         }
  30.         @keyframes myani3 {
  31.             from {
  32.                 width: 200px;
  33.                 height: 200px;
  34.                 border-radius: 100px;
  35.             }
  36.             to {
  37.                 width: 500px;
  38.                 height: 500px;
  39.                 border-radius: 250px;
  40.             }
  41.         }
  42.         @keyframes myani4 {
  43.             from {
  44.                 margin-left: 0;
  45.             }
  46.             to {
  47.                 margin-left: 500px;
  48.             }
  49.         }
  50.     </style>
  51. </head>
  52. <body>
  53. <img src="http://lorempixel.com/200/200">
  54. </body>
  55. </html>
Advertisement
Add Comment
Please, Sign In to add comment