最佳答案
我在CSS中运行一些设置为opacity: 0;
的元素的动画。动画类应用于click,并且使用关键帧,它将不透明度从0
更改为1
(以及其他事情)。
不幸的是,当动画结束时,元素返回opacity: 0
(在Firefox和Chrome中)。我的自然想法是动画元素保持最终状态,覆盖它们的原始属性。这不是真的吗?如果不是,我如何让元素这样做?
代码(不包括有前缀的版本):
@keyframes bubble {
0% { transform:scale(0.5); opacity:0.0; }
50% { transform:scale(1.2); opacity:0.5; }
100% { transform:scale(1.0); opacity:1.0; }
}