老师您好,check pls .thanks a lot.
<!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;
position: relative;
}
@keyframes rotate{
from{ transform:rotate(0deg);}
to{transform:rotate(360deg);}
}
div::before{
content: "";
width: 20px;
height: 20px;
border: 90px solid red;
border-radius: 50%;
background:#fff;
position: absolute;
top:100px;
left:0px;
}
div::after{
content: "";
width: 20px;
height: 20px;
border: 90px solid #fff;
border-radius: 50%;
background:red;
position: absolute;
top:100px;
right:0px;
}
</style>
</head>
<body>
<div></div>
</body>
</html>
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星