- HTML中文网
- 联系QQ:88526
- QQ交流群

- 微信公众号

animation-delay属性
含义:
animation-delay 属性定义动画什么时候开始。
animation-delay 值单位可以是秒(s)或毫秒(ms)
浏览器支持:
表格中的数字表示支持该属性的第一个浏览器版本号。
紧跟在 -webkit-, -ms- 或 -moz- 前的数字为支持该前缀属性的第一个浏览器版本号
属性 | ![]() | ![]() | ![]() | ![]() | ![]() |
浏览器 | IE | Chrome | Firefox | Safari | Opera |
animation-delay | 10.0 | 43.0/4.0 -webkit- | 16.0/5.0 -moz- | 9.0/4.0 -webkit- | 30.0 15.0 -webkit- 12.0 -o- |
CSS语法
animation-delay: time;
time:定义动画开始前等待的时间,以秒或毫秒计。默认值为0
<style> div { width:100px; height:100px; background:red; position:relative; animation:demo 5s infinite; animation-delay:1s; /*Safari 和 Chrome*/ -webkit-animation:demo 5s infinite; -webkit-animation-delay:1s; } @keyframes demo { from {left:0px;} to {left:450px;} } @-webkit-keyframes demo { from {left:0px;} to {left:450px;} } </style> </head> <body> <div></div>
点击 "运行实例" 按钮查看在线实例
效果图:
推荐手册