请老师检查,谢谢!
<!DOCTYPE html>
<html lang="en">
<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;
animation-iteration-count: infinite;
z-index: 1;
}
div::before,
div::after{
display: block;
content: "";
width: 200px;
height: 200px;
border-radius: 50%;
position: absolute;
z-index: 20;
}
div::after{
background: red;
top: 96px;
left: 0px ;
}
div::before{
background: #fff;
top: 96px;
right: 0px;
}
.sub_1,
.sub_2{
display: block;
width: 50px;
height: 50px;
border-radius: 50%;
position: absolute;
z-index: 30;
}
.sub_1{
top: 165px;
left: 70px;
background: #fff;
}
.sub_2{
top: 165px;
right: 70px;
background:#ff0000;
}
@keyframes rotate {
form{ transform: rotateZ(0deg);}
to{ transform: rotateZ(360deg);}
}
</style>
</head>
<body>
<div>
<span class="sub_1"></span>
<span class="sub_2"></span>
</div>
</body>
</html>3
收起
正在回答
1回答
同学你好,效果是正确的,继续加油,祝学习愉快~
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星