css动画--动画加载
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>动画加载</title>
<style>
@keyframes box {
from {
opacity: 1;
transform: translateY(0);
}
to {
opacity: 0.1;
transform: translateY(10px);
}
}
.box {
display: flex;
justify-content: center;
}
.box>div {
width: 1rem;
height: 1rem;
margin: 3rem 0.2rem;
background: #8385aa;
border-radius: 50%;
animation: box 0.6s infinite alternate;
}
.box>div:nth-child(2) {
animation-delay: 0.2s;
}
.box> div:nth-child(3) {
animation-delay: 0.4s;
}
</style>
</head>
<body>
<div class="box">
<div></div>
<div></div>
<div></div>
</div>
</body>
</html>
本文标题:css动画--动画加载
本文链接:https://www.haomeiwen.com/subject/lbrxcftx.html
网友评论