我看到一个令人讨厌的错误发生在动画循环结束时,闪烁几分之一秒,并且动画看起来不连贯。Css无限循环动画错误
这是pen。
SCSS:
$dim: 60px;
$mult: 1.8;
$color: #bada55;
body, html {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
width: 100%;
height: 100%;
margin: 0;
padding: 0;
background-color: #36a;
}
.circle {
background-color: $color;
border-radius: 50%;
width: $dim;
height: $dim;
position: relative;
}
.circle:before {
content: "";
display: table;
background-color: $color;
border-radius: 50%;
position: absolute;
animation: notification 800ms ease-in infinite;
}
@keyframes notification{
0% {
opacity: 1;
width: $dim;
height: $dim;
left: 0;
top: 0;
}
90% {
opacity: 0;
left: -(($dim * $mult) - $dim)/2;
top: -(($dim * $mult) - $dim)/2;
width: $dim * $mult;
height: $dim * $mult;
}
100% {
opacity: 0;
width: $dim;
height: $dim;
left: 0;
top: 0;
}
}
我已经尝试添加另一个框架,但它并没有真正将其删除。之后我也尝试隐藏之前的div,但不起作用。无论是Z指数。
有什么建议吗?
在Chrome看起来甚至buggier我:-(它甚至更加起伏 –
它的不透明度0已经 –
我真的不明白你的意思还ease-。在没有魔法的情况下,它不会让任何事情变得顺利无论你做什么 – reuns