steffenz

Untitled

Sep 26th, 2012
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 1.00 KB | None | 0 0
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4.     <title>Transitions & Animations</title>
  5.     <meta charset="utf-8">
  6.     <style type="text/css">
  7.     body{
  8.         margin: 0;
  9.         padding: 0;
  10.     }
  11.    
  12.     #animWrap {
  13.         position: relative;
  14.         width:960px;
  15.         height:600px;
  16.         background: rgb(100,150,200);
  17.         margin: auto;
  18.         overflow: hidden;
  19.     }
  20.    
  21.     img{
  22.         position: absolute;
  23.     }
  24.     #plane1{
  25.         width:300px;
  26.         right:-300px;
  27.         top:200px;
  28.         -webkit-transition:right 10s linear 3s, top 15s ease 3s;
  29.     }
  30.    
  31.     #animWrap #cloud1 {
  32.         width:400px;
  33.         top:50px;
  34.         left:50px;
  35.         opacity: 0.9;
  36.         -webkit-transition-property: left;
  37.         -webkit-transition-duration: 10s;
  38.         -webkit-transition-delay: 0s;
  39.         -webkit-transition-timing-function:linear;
  40.        
  41.     }
  42.    
  43.     /* trigger */
  44.     #animWrap:hover #cloud1{
  45.         left:500px;
  46.     }
  47.    
  48.     #animWrap:hover #plane1 {
  49.         right:1000px;
  50.         top:400px;
  51.     }
  52.    
  53.  
  54.    
  55.     /**/
  56.    
  57.     </style>
  58. </head>
  59. <body>
  60.  
  61. <div id="animWrap">
  62.     <img id="plane1" src="plane.png"/>
  63.     <img id="cloud1" src="cloud.png"/>
  64. </div>
  65.  
  66.  
  67. </body>
  68. </html>
Advertisement
Add Comment
Please, Sign In to add comment