老师,可以再改进吗
<!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;
}
@keyframes rotate{
from{transform:rotate(0deg);}
to{
transform:rotate(360deg);}
}
div::after{
content: "";
display: block;
width:30px;
height:30px;
border:85px solid white;
border-radius:50%;
background-color:red;
position: absolute;
top: 100px;
left:0;
}
div::before{
content: "";
display: block;
width:30px;
height:30px;
border:85px solid red;
border-radius:50%;
background-color:white;
position: absolute;
top: 100px;
left:200px;
}
</style>
</head>
<body>
<div>
</div>
</body>
</html>
正在回答 回答被采纳积分+1
- 参与学习 人
- 提交作业 2198 份
- 解答问题 5012 个
如果你有web端基础,既想进阶,又想进军移动端开发,那就来吧,我们专题为你带来的课程有HTML5、CSS3、移动基础、响应式、bootstrap、less等,让你在前端道路上畅通无阻!
了解课程




恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星