Text: CSS implementation of the three-load animation-piano keys
The implementation of this animation today is also very simple, simple few lines of code can be done. To this animation to take an elegant name-piano keys, but also can not think of any more image of the name. Nonsense not much to say directly.
1. Look at the GIF image first
2. Code implementation Ideas
2.1 Defines an element of five blocks.
2.2 The opposing block element uses animation, the delay changes the transparency.
3. Main use of technology
The main use of the animation animation
@-webkit-keyframes load{
0%{opacity:1;}
100%{opacity:0;}
}
. m-load2. item{-webkit-animation:load 0.5s linear 0s infinite;
4. Source code
1 <!DOCTYPE HTML>2 <HTML>3 <Head>4 <Metahttp-equiv= "Content-type"Content= "text/html; charset=utf-8;">5 <title>CSS3 implementing animated animations for loads 3</title>6 <Metaname= "Author"content= "Rainna" />7 <Metaname= "keywords"content= "Rainna ' s css Lib" />8 <Metaname= "description"content= "CSS3" />9 <style>Ten *{margin:0;padding:0;} One . M-load{background:url (' load.gif ') Center Center no-repeat;} A - . M-load,.m-load2{width:60px;Height:10px;margin:100px Auto;} - the /** Static style of loading animations **/ - . m-load2:before,.m-load2:after,.m-load2. Item{float: Left;width:10px;Height:10px;margin:0 2px 0 0;background:#444;} - . M-load2:before,.m-load2:after{content:"';} - + /** Load Animation **/ - @-webkit-keyframes Load{ + 0%{opacity:1;} A 100%{Opacity:0;} at } - . M-load2:before{-webkit-animation:load 0.5s linear 0s infinite;} - . M-load2. Item:nth-child (1){-webkit-animation:load 0.5s linear 0.1s infinite;} - . M-load2. Item:nth-child (2){-webkit-animation:load 0.5s linear 0.2s infinite;} - . M-load2. Item:nth-child (3){-webkit-animation:load 0.5s linear 0.3s infinite;} - . M-load2:after{-webkit-animation:load 0.5s linear 0.4s infinite;} in </style> - </Head> to + <Body> - <Divclass= "M-load"></Div> the * <Divclass= "M-load2"> $ <Divclass= "Item"></Div>Panax Notoginseng <Divclass= "Item"></Div> - <Divclass= "Item"></Div> the </Div> + </Body> A </HTML>
CSS implementation Load Animation three-piano button