<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
body{
background: #000;
}
.outer,
.middle,
.inner {
border: 3px solid transparent;
border-top: 3px solid #3cefff;
border-right: 3px solid #3cefff;
border-radius: 50%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
/* box-shadow: 0px 0px 18px #3cefff; */
}
.outer {
width: 48px;
height: 48px;
animation: action 2s linear infinite;
}
.middle {
width: 32px;
height: 32px;
/* reverse 动画反向播放 */
animation: action 1.75s linear reverse infinite;
}
.inner {
width: 16px;
height: 16px;
animation: action 1.5s linear infinite;
}
@keyframes action {
to {
transform: translate(-50%, -50%) rotate(360deg);
}
}
</style>
</head>
<body>
<div class="loader">
<div class="outer"></div>
<div class="middle"></div>
<div class="inner"></div>
</div>
</body>
</html>
css加载动画
最新推荐文章于 2024-05-30 10:50:01 发布