CSS implementation Load Animation three-piano button

Source: Internet
Author: User

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{
. 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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.