Pure CSS3 realizes the effect of div entering and exiting in order

Pure CSS3 realizes the effect of div entering and exiting in order

This article mainly introduces the effect of div entering and exiting in sequence using pure CSS3. It has a certain reference value. If you are interested, you can learn more about it.

Effect:

source code:

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			div{
				margin-top: 10px;
				height: 50px;
				background-color: #FF0000;
				opacity: 0.6;
			}
			
			.a{
				animation: aa 2s linear 100ms infinite;
			}
			.b{
				animation: bb 2s linear infinite
			}
			.c{
				animation: cc 2s linear infinite
			}
			.d{
				animation:dd 2s linear infinite
			}
			
			@keyframes aa{
				0%{width: 0;}
				25%{width:200px;}
				50%{width:200px;}
				75%{width:200px;}
				100%{width:200px;}
			}
			@keyframes bb{
				0%{width: 0;}
				25%{width:0px;}
				50%{width:200px;}
				75%{width:200px;}
				100%{width:200px;}
			}
			@keyframes cc{
				0%{width: 0;}
				25%{width:0px;}
				50%{width:0px;}
				75%{width:200px;}
				100%{width:200px;}
			}
			@keyframes dd{
				0%{width: 0;}
				25%{width:0px;}
				50%{width:0px;}
				75%{width:0px;}
				100%{width:200px;}
			}
			
		</style>
	</head>
	<body>
		<div class="a">
			
		</div>
		<div class="b">
			
		</div>
		<div class="c">
			
		</div>
		<div class="d">
			
		</div>
	</body>
</html>

This is the end of this article about how to use pure CSS3 to achieve the effect of divs entering and exiting in sequence. For more relevant content about CSS3 divs entering and exiting in sequence, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future!

<<:  HTML+CSS to achieve charging water drop fusion special effects code

>>:  HTML+CSS to achieve responsive card hover effect

Recommend

Docker implements container port binding local port

Today, I encountered a small problem that after s...

How to build a redis cluster using docker

Table of contents 1. Create a redis docker base i...

Execute initialization sql when docker mysql starts

1. Pull the Mysql image docker pull mysql:5.7 2. ...

How to receive binary file stream in Vue to realize PDF preview

Background Controller @RequestMapping("/getP...

Perfect solution for vertical centering of form elements

Copy code The code is as follows: <!DOCTYPE ht...

How to install elasticsearch and kibana in docker

Elasticsearch is very popular now, and many compa...

VUE implements a Flappy Bird game sample code

Flappy Bird is a very simple little game that eve...

MySQL exposes Riddle vulnerability that can cause username and password leakage

The Riddle vulnerability targeting MySQL versions...

Mysql | Detailed explanation of fuzzy query using wildcards (like,%,_)

Wildcard categories: %Percent wildcard: indicates...

MySQL solution for creating horizontal histogram

Preface Histogram is a basic statistical informat...

Vue implements local storage add, delete and modify functions

This article example shares the specific code of ...

Docker image loading principle

Table of contents Docker images What is a mirror?...

Basic operation tutorial of files and permissions in centos

Preface Before we begin, we should briefly unders...

Application of mapState idea in vuex

Table of contents 1. Map method 2. Application ba...