老师,为什么我的动图好奇怪啊?
<!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;
/*此处写代码*/
animation-iteration-count:infinite;
}
@keyframes rotate{
from{transform:rotate(0deg);}
to{transform:rotate(360deg);}
}
div::before{
top:50%;
position:absolute;
content:"";
display:block;
width: 30px;
height: 30px;
border:85px red solid;
border-radius:50%;
background-color:white;
}
div::after{
top:50%;
left:50%;
position:absolute;
content:"";
display:block;
width: 30px;
height: 30px;
border:85px white solid;
border-radius:50%;
background-color:red;
}
</style>
</head>
<body>
<div></div>
</body>
</html>
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星