<!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>
.box {
display: inline-block;
width: 30px;
height: 30px;
border: 4px solid rgba(0, 0, 0, 0.1);
border-radius: 50%;
border-left: 4px solid #7983ff;
animation: box-anmail 1.2s linear infinite;
}
@keyframes box-anmail {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
</style>
</head>
<body>
<!-- 使用半透明的border 对于整个元素,除了用作圆环加载指示器的一侧。使用animation 旋转元素。 -->
<div class="box"></div>
</body>
</html>
网友评论