css keyframe animation in firefox and IE -


http://dev.viral-minds.com/miller/abc/abc.html

two questions this

  1. how keep green block "blinking" @ beginning when page loads?
  2. the animation works on chrome @ moment...how work in ff , ie?

thanks.

<!doctype html> <html lang="en"> <head>     <meta charset="utf-8">     <title>main</title>      <style type="text/css">         body          {             background-color:#fffff0; /*ivory*/             overflow: hidden;         }          #box         {             position: absolute;             width:495px;             height:263px;             background:#32331d;             top: 20px;             left: 20px;         }          #nav         {             position: absolute;             margin-left:30px;             width:100%;             height:100px;             top: 425px;             z-index: 100;             background-image:url('colors.png');             background-repeat:no-repeat;         }           #stars,         #stars-2,         #small-stars,         #small-stars-2 {             position: absolute;             top: 50%;             left: 50%;             width: 800px;             height: 800px;             margin: -300px 0 0 -300px;             background: url(stars-large.png) no-repeat center center;             -webkit-animation-name: starslarge;             -webkit-animation-duration: 240s;             -webkit-animation-iteration-count: infinite;             -webkit-animation-timing-function: linear;         }          @-webkit-keyframes starslarge {             {                 -webkit-transform: rotate(0deg) scale(3);                 opacity: .9;             }             {                 -webkit-transform: rotate(360deg) scale(.5);                 opacity: .5;             }         }          #stars-2 {             -webkit-animation-name: starslargealt;             -webkit-animation-duration: 180s;             -webkit-animation-iteration-count: infinite;             -webkit-animation-timing-function: linear;         }          @-webkit-keyframes starslargealt {             {                 -webkit-transform: rotate(180deg) scale(3);                 opacity: .9;             }             {                 -webkit-transform: rotate(360deg) scale(.5);                 opacity: .5;             }         }          #small-stars,         #small-stars-2 {             background: url(stars-small.png) no-repeat center center;             -webkit-animation-duration: 60s;             -webkit-animation-name: starssmall;         }          #small-stars-2 {             -webkit-animation-name: starssmallalt;             -webkit-animation-duration: 120s;         }          @-webkit-keyframes starssmall {             {                 -webkit-transform: rotate(360deg) scale(3);                 opacity: .9;             }             {                 -webkit-transform: rotate(0deg) scale(.5);                 opacity: .5;             }         }          @-webkit-keyframes starssmallalt {             {                 -webkit-transform: rotate(0deg) scale(3);                 opacity: .9;             }             {                 -webkit-transform: rotate(360deg) scale(.5);                 opacity: .5;             }         }     </style> </head> <body>     <div id="box"><img src="actual.png"></img></div>     <div id="nav"></div>     <div id="stars"></div>     <div id="stars-2"></div>     <div id="small-stars"></div>     <div id="small-stars-2"></div> </body> 

item 1: green block flickers because overlayed image not retrieved server yet. add display: none; css #box, programmatically display after page has been loaded. example:

// jquery: $(document).ready(function(){   $('#box').show(); }); 

item 2: animation works in chrome because using -webkit specific style definitions. need research alternatives, such -moz , -ms in order see if can work in browsers. try omitting prefix altogether.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -