【发布时间】:2017-06-26 18:09:33
【问题描述】:
随着最新的 Chrome v59.0.3071.109 更新,我意识到关键帧动画可能会闪烁。
CSS
.rectangle {
display:block;
background:#AAA;
margin:3em auto;
width:30px;
height:50px;
box-shadow:
inset #AAA 0 0 0 0,
inset #222 0 0px 0 0;
animation:filler 5s linear infinite;
}
@keyframes filler{
0%{
box-shadow:
inset #AAA 0 0px 0 0,
inset #222 0 0px 0 0;
}
100%{
transform:rotate(360deg);
box-shadow:
inset #AAA 0 0px 0 0,
inset #222 0 50px 0 0;
}
}
HTML
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Flick example">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<div class="rectangle"></div>
</body>
</html>
DEMO(请检查您的 Chrome 版本是 v59.0.3071.109)
https://jsbin.com/nameyi/edit?html,css,output
我已经意识到,如果我移除了旋转,它似乎会变得更好,但我想保留旋转。
有什么办法可以避免闪退?
【问题讨论】:
标签: css google-chrome