A variety of loading animation sharing
Various loading animation sharing:
##Effect twenty-three
##Two squares, The initial positioning is to the upper left (top: 0; left: 0;);
A complete movement is divided into four stages: in the first stage, the upper left moves to the upper right, rotated 90°, and the width and height are reduced; Two stages: move the upper right to the lower right, rotate 180°, and restore the width and height; the third stage, move the lower right to the lower left, rotate 270°, and reduce the width and height; the fourth stage, move the lower left to the upper left, rotate 360° , width and height reply.
The animation delay time difference is negative half of the animation time.
{:;:;:;:; }{:;:;:;:; }{:;:;:;:; }{:;:;:;:; }
{animation: fire_ball 1.5s linear infinite;}@keyframes fire_ball { 50% { height: 30px;width: 30px;top: 50%; } 100% {height: 0;width: 0;top: 0; }}
It’s very similar to the game I played when I was a kid - Pac-Man
The production of Pac-Man on the left: the width and height of the two divs are 0, and only Set the border and set the color attribute of the right border to transparent. The code and effect are as follows:
.pac_head { border: 25px solid #fff; border-right-color: transparent; border-radius: 50%; }
Pac-Man’s mouth has been made. For the remaining two divs, one rotates forward to the Z-axis and the other rotates in the opposite direction to the Z-axis, thus making the eating action.
@keyframes pac_ball { 100% { right: 55%; }}
The beating paper
@keyframes beat_ball { 25% { transform: translateY(25%) rotate(22.5deg);//下落border-bottom-right-radius: 10%; } 50% {border-bottom-right-radius: 100%;transform: translateY(50%) scale(1, 0.8) rotate(45deg) //scale,是为了让形变看起来有弹性 } 75% {transform: translateY(25%) rotate(67.5deg) //上升 } 100% {transform: translateY(0) rotate(90deg) //旋转90°结束一个周期,刚好和初始状态一模一样,那就直接重复执行动画即可 }}
@keyframes beat_shadow { 50%{ transform: scale(1.25,0.8); }}
##Twenty-seven, effect twenty-seven
A div and a pseudo class are created. The div is responsible for rotating, and the pseudo-class is responsible for changing the height. Each one performs its own duties.
@keyframes locker_ball { //div旋转 25%{ transform: rotateZ(180deg); } 50%{transform: rotateZ(180deg); } 75%{transform: rotateZ(360deg); } 100%{transform: rotateZ(360deg); }} @keyframes locker_ballh { //伪类高度改变 25%{ height: 40px; } 50%{height: 0; } 75%{height: 0; } 100%{height: 40px; }}
The effect of the clock (my positioning seems not to be in the middle)The effect of the clock only uses one keyframe animation. That is to rotate 360°, just change the animation movement time of the two pointers.
@keyframes clock { 100%{ transform: rotateZ(360deg); }}
The above is the detailed content of A variety of loading animation sharing. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Using Bootstrap in Vue.js is divided into five steps: Install Bootstrap. Import Bootstrap in main.js. Use the Bootstrap component directly in the template. Optional: Custom style. Optional: Use plug-ins.

HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

To set up the Bootstrap framework, you need to follow these steps: 1. Reference the Bootstrap file via CDN; 2. Download and host the file on your own server; 3. Include the Bootstrap file in HTML; 4. Compile Sass/Less as needed; 5. Import a custom file (optional). Once setup is complete, you can use Bootstrap's grid systems, components, and styles to create responsive websites and applications.

There are two ways to create a Bootstrap split line: using the tag, which creates a horizontal split line. Use the CSS border property to create custom style split lines.

There are several ways to insert images in Bootstrap: insert images directly, using the HTML img tag. With the Bootstrap image component, you can provide responsive images and more styles. Set the image size, use the img-fluid class to make the image adaptable. Set the border, using the img-bordered class. Set the rounded corners and use the img-rounded class. Set the shadow, use the shadow class. Resize and position the image, using CSS style. Using the background image, use the background-image CSS property.

How to use the Bootstrap button? Introduce Bootstrap CSS to create button elements and add Bootstrap button class to add button text

To adjust the size of elements in Bootstrap, you can use the dimension class, which includes: adjusting width: .col-, .w-, .mw-adjust height: .h-, .min-h-, .max-h-
