animation - CSS3 动画 :element moved to its initial position after @keyframes actions

标签 animation css position element

CSS3 动画将元素恢复到其初始位置。

div 向底部移动,而不是它的初始位置。

这是有意为之的行为吗? 它能留在最后一个位置吗?

请看现场演示:fiddle-demo

最佳答案

将您的 css 规则声明为...

-vendor-animation: mymove 1s 1 forwards;

这是陈述的简写方式:

-ventor-animation-fill-mode: forwards;

这可以防止你的动画重置到开头

关于animation - CSS3 动画 :element moved to its initial position after @keyframes actions,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8759376/

相关文章:

css - 为什么 animation-fill-mode 不适用于这个特定元素?

ios - 如何在基于导航的应用程序中更改 Push 和 Pop 动画

javascript - jquery Masonry,在div的中心添加一个新的div#container

c++ - MPL pos 是一个未记录的元函数吗?

javascript - Flash:即使在舞台/浏览器之外,也可以在单击并拖动(向下移动)后跟踪鼠标位置?

javascript - 如何计算 'scrollBehaviour: smooth' 动画之后事件发生的时间?

javascript - 如何使用鼠标滚轮为 div 设置线性动画?

jQuery 下一个/上一个按钮在 IE7 中不能正常工作

html - <style> 标签需要 ;是否结束

html - 尽管 body 高度为 100%,页脚仍然卡在中间页面