<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<title>Loading</title>
<style>
.app {
width: 100%;
height: 100%;
display: flex;
position: fixed;
top: 0;
left: 0;
align-items: center;
justify-content: center;
background: #333333;
}
.loadBox{
width: 100px;
height: 100px;
top: -50px;
position: relative;
}
.loadBox span{
width: 16px;
height: 16px;
border-radius: 50%;
background: #f3f3f3;
position: absolute;
-webkit-animation: load 1.04s ease infinite;
}
@-webkit-keyframes load{
0%{
opacity: 1;
}
100%{
opacity: 0.2;
}
}
.loadBox span:nth-child(1){
left: 0;
top: 50%;
margin: -10px 0 0 -10px;
-webkit-animation-delay:0.13s;
}
.loadBox span:nth-child(2){
left: 25%;
top: 25%;
margin: -10px 0 0 -10px;
-webkit-animation-delay:0.26s;
}
.loadBox span:nth-child(3){
left: 50%;
top: 0;
margin: -10px 0 0 -10px;
-webkit-animation-delay:0.39s;
}
.loadBox span:nth-child(4){
top: 25%;
right: 25%;
margin: -10px -10px 0 0;
-webkit-animation-delay:0.52s;
}
.loadBox span:nth-child(5){
right: 0;
top: 50%;
margin: -10px -10px 0 0;
-webkit-animation-delay:0.65s;
}
.loadBox span:nth-child(6){
right: 25%;
top: 75%;
margin: -10px -10px 0 0;
-webkit-animation-delay:0.78s;
}
.loadBox span:nth-child(7){
bottom: 0;
left: 50%;
margin: 0 0 -10px -10px;
-webkit-animation-delay:0.91s;
}
.loadBox span:nth-child(8){
bottom: 25%;
left: 25%;
margin: 0 0 -10px -10px;
-webkit-animation-delay:1.04s;
}
</style>
</head>
<body>
<div class="app">
<div class="loadBox">
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
</div>
</body>
</html>
css实现Loading 效果
最新推荐文章于 2024-08-31 08:12:40 发布