为什么我的旋转会抖动,该怎么修改
来源:2-18 编程练习
lala啦啦
2018-03-07 21:18:49
<!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;
}
div:before {
content:"";
display:block;
width: 40px;
height: 40px;
background-color: #fff;
border-radius: 50%;
border: 80px solid red;
float:left;
margin-top:100px;
}
div:after {
content:"";
display:block;
width: 40px;
height: 40px;
background-color: red;
border-radius: 50%;
border: 80px solid #fff;
float:right;
margin-top:-200px;
}
@keyframes rotate {
from {transform:rotate(0deg)}
to {transform:rotate(360deg)}
}
</style>
</head>
<body>
<div></div>
</body>
</html>1回答
怎么都被占用了呢
2018-03-08
给body添加一个超出部分隐藏,效果会好些哦

相似问题