小圆环怎么画呢
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>2-5</title>
<style type="text/css">
div {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
box-sizing: border-box;
width: 400px;
height: 400px;
margin: auto;
border: 1px solid red;
border-bottom: 200px solid red;
border-radius: 50%;
transform-origin: 50% 50%;
animation-name: rotate;
animation-duration: 5s;
animation-timing-function: linear;
/*此处写代码*/
-webkit-animation-duration:30s;
animation-duration:30s;
-webkit-animation-iteration-count:infinite;
animation-iteration-count:infinite;
}
div::after{
content: ".";
width: 200px;
height: 200px;
background: red;
border-radius: 50%;
position: absolute;
top: 50%;
left: 50%;
}
div::before{
content: ".";
width: 200px;
height: 200px;
background: white;
border-radius: 50%;
position: absolute;
top: 50%;
}
@keyframes rotate{
from{transform: rotate(3600deg);}
to{transform: rotate(0deg);}
}
</style>
</head>
<body>
<div></div>
</body>
</html>
正在回答 回答被采纳积分+1
相似问题
登录后可查看更多问答,登录/注册
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧