animation-fill-mode:设置样式以在动画不播放时应用元素。
注释:其属性值是由逗号分隔的一个或多个填充模式关键词。
| 默认值: | none | 
|---|---|
| 继承性: | no | 
| 版本: | CSS3 | 
| JavaScript 语法: | object.style.animationFillMode=none | 
animation-fill-mode: none|forwards|backwards|both|initial|inherit;
| 值 | 描述 | 
|---|---|
| none | 默认值。无样式 | 
| forwards | 动画结束后,使用元素的结束属性值。 | 
| backwards | 使用元素的起始值。 | 
| both | 动画将遵循向前和向后的规则。 | 
为 h1 元素规定填充模式:
h1
{
animation-fill-mode: forwards;
}
| 属性 | |||||
|---|---|---|---|---|---|
| animation-fill-mode | 4.0 -webkit- | 10.0 | 16.0 5.0 -moz-  | 4.0 -webkit- | 15.0 -webkit- 12.1 12.0 -o-  | 
Internet Explorer 10、Firefox 以及 Opera 支持 animation-fill-mode 属性。
Safari 和 Chrome 支持替代的 -webkit-animation-fill-mode 属性。
注释:Internet Explorer 9 以及更早的版本不支持 animation-fill-mode 属性。
CSS3 教程:CSS3 动画
备案信息: 粤ICP备15087711号-2
Copyright © 2008-2025 啊嘎哇在线工具箱 All Rights.
本站所有资料来源于网络,版权归原作者所有,仅作学习交流使用,如不慎侵犯了您的权利,请联系我们。