Several lines of css3 code to achieve superb loading animation, and several lines of css3 code to be superb

Source: Internet
Author: User

Several lines of css3 code to achieve superb loading animation, and several lines of css3 code to be superb

I have previously shared with you the loading animation implemented by css3. Today, we bring you a special animation loading effect with just a few lines of code. Let's take a look:

 

Download Online Preview source code

 

Implementation Code:

Simple html code:

<div>        <i></i></div>

Css3 code:

body {  background: black;  display: -webkit-box;  display: -webkit-flex;  display: -ms-flexbox;  display: flex;  height: 100vh;}@-webkit-keyframes rotation {  0% {    -webkit-transform: rotate(0deg);    transform: rotate(0deg);  }  100% {    -webkit-transform: rotate(360deg);    transform: rotate(360deg);  }}@keyframes rotation {  0% {    -webkit-transform: rotate(0deg);    transform: rotate(0deg);  }  100% {    -webkit-transform: rotate(360deg);    transform: rotate(360deg);  }}div {  width: 200px;  height: 200px;  border-radius: 50%;  border: 1px solid rgba(0, 120, 255, 0.5);  -webkit-box-shadow: 0px 0px 20px rgba(0, 120, 255, 0.5), inset 0px 0px 20px rgba(0, 120, 255, 0.5);  box-shadow: 0px 0px 20px rgba(0, 120, 255, 0.5), inset 0px 0px 20px rgba(0, 120, 255, 0.5);  margin: auto;  position: relative;}div i {  content: "";  display: block;  width: 0;  height: 15px;  position: absolute;  top: -webkit-calc(50% - 5px);  top: calc(50% - 5px);  left: 2px;  -webkit-box-shadow: 0px 0px 50px 10px #0078ff;  box-shadow: 0px 0px 50px 10px #0078ff;  -webkit-transform-origin: 100px 0;  -ms-transform-origin: 100px 0;  transform-origin: 100px 0;  -webkit-animation: rotation linear 2s infinite;  animation: rotation linear 2s infinite;}

Address: http://www.w2bc.com/Article/6293


How does css3 + html load the display animation instead of clicking a button to achieve the effect?

When loading the page, a js script is automatically loaded and the button is clicked.
 
Amazing web page Demo: This is actually written in CSS3.

In the past, many effects can be achieved only by writing complex JavaScript code. Now, you only need to write a few CSS3 codes. Today, this article will share with you 14 amazing CSS3 feature application demos, so that you can feel the charm of CSS3. Monster uses CSS3 to draw strange creatures and move your mouse to see what the effect will be? Be careful! Tilt ShiftCSS3 achieves the text stereoscopic effect and rotation effect. Click the text to enter the editing status and enter the text. Leica is a camera image? No! This is a Leica camera drawn in pure CSS3 without any images. Responsive Design example using the CSS3 Media Query feature. The time tunnel effect implemented by Portals pure CSS3 makes it hard to believe that this effect can be written using CSS code. Bowie is very vivid in the twinkling of an eye! Focus content Focus effect, where the cursor is suspended, the content is automatically focused. Rain: This demo simulates the effect of raindrops falling. move the cursor and move it away, and the characters will fall. The shadow effect in the Carve Me text can be used to simulate the engraving effect, and is implemented using the CSS3 text-shadow feature. Bokeh uses the CSS3 gradient feature to implement a similar Bokeh effect in photography. Flashlight uses the CSS3 feature to simulate very special lighting effects. Icons will move the icon, move the mouse to see the effect. Solar System uses the CSS3 feature to simulate the Solar System ).

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.