CSS implementation loading loading animations

Source: Internet
Author: User

Excellent front-end engineers always prioritize using CSS instead of images:

Above This animation is not a GIF, but rather a pure CSS drawing that updates the animation through a JavaScript timer.

The basic idea is to create 8 circular Div, absolutely positioned into a circle, and then, in turn, update the transparency through the opacity property to get a loading.

Compared with GIF, the main benefit of CSS is that for different background colors, the animation is perfect, but also can be used to easily use CSS shading, lighting and other effects, while GIF support transparent color, but the background color selected when creating and the actual background color inconsistent will cause significant raw edges, and GIF is not easy to dynamically update , you need to regenerate the picture.

CSS can be wrapped into a jquery plug-in to achieve a very simple but very powerful loading animation, the disadvantage is that IE does not support Border-radius, so IE see the block.

If you don't want to write your own code, here's a visual online build CSS3 loading animated website, quite powerful:

http://fgnass.github.io/spin.js/

In addition to working properly in modern browsers, the generated code can also use VML to be compatible with outdated IE browsers, with minimum compatibility to ie6!

CSS implementation loading loading animations

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.