关于画面抖动
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>2-5</title>
<style type="text/css">
body{
overflow: hidden;
}
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::after,div::before{
content: "";
display: block;
width: 200px;
height: 200px;
box-sizing: border-box;
border-radius: 50%;
position: absolute;
}
div::after{
background-color: #fff;
border: 85px solid red;
right: 0px;
top:100px;
}
div::before{
border-radius: 50%;
background-color: red;
border: 85px solid #fff;
left: 0px;
top:100px;
}
@keyframes rotate{
from {transform:rotate(0deg)}
to {transform:rotate(360deg)}
}
</style>
</head>
<body>
<div></div>
</body>
</html>请问为什么加上 body{over:hidden} 动画开始播放就没有抖动 老师可以解释下原理吗
12
收起
正在回答 回答被采纳积分+1
1回答
响应式开发与常用框架 2018
- 参与学习 人
- 提交作业 2198 份
- 解答问题 5012 个
如果你有web端基础,既想进阶,又想进军移动端开发,那就来吧,我们专题为你带来的课程有HTML5、CSS3、移动基础、响应式、bootstrap、less等,让你在前端道路上畅通无阻!
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星