小白教程
所有教程
关于
Search
172.70.127.42
172.70.127.42
参数设置
贡献
退出
操作
编辑
移动
保护
信息
历史
删除
查看“Css3 pr animation delay”的源代码
本页内容
上一节:
Css3_pr_animation_timing_function
下一节:
Css3_pr_animation_iteration_count
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{DISPLAYTITLE:animation-delay}}[[Category:css reference|35]] = CSS3 animation-delay 属性 = 等待两秒,然后开始动画: <sample title="" desc="" lang="html" hererun="1"> animation-delay:2s; -webkit-animation-delay:2s; /* Safari 和 Chrome */ </sample> <run name=""> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>小白教程(xiaobai.wang)</title> <style> div { width:100px; height:100px; background:red; position:relative; animation:mymove 5s infinite; animation-delay:2s; /*Safari and Chrome*/ -webkit-animation:mymove 5s infinite; -webkit-animation-delay:2s; } @keyframes mymove { from {left:0px;} to {left:200px;} } @-webkit-keyframes mymove /*Safari and Chrome*/ { from {left:0px;} to {left:200px;} } </style> </head> <body> <p><strong>注意:</strong> animation-delay 属性不兼容Internet Explorer 9 以及更早版本的浏览器</p> <div></div> </body> </html> </run> 在此页底部有更多的例子。 == 浏览器支持 == 表格中的数字表示支持该属性的第一个浏览器版本号。 紧跟在 -webkit-, -ms- 或 -moz- 前的数字为支持该前缀属性的第一个浏览器版本号。 {| class="table table-striped table-hover" ! 属性 ! Chrome ! Internet Explorer / Edge ! Firefox ! Safari ! Opera |- | animation-delay | 43.04.0 -webkit- | 10.0 | 16.05.0 -moz- | 9.04.0 -webkit- | 30.015.0 -webkit-12.0 -o- |} == 标签定义及使用说明 == animation-delay 属性定义动画什么时候开始。 animation-delay 值单位可以是秒(s)或毫秒(ms)。 '''提示:''' 允许负值,-2s 使动画马上开始,但跳过 2 秒进入动画。 {| class="table table-striped table-hover" | 默认值: | 0 |- | 继承: | no |- | 版本: | CSS3 |- | JavaScript 语法: | object object.style.animationDelay="2s" |} == 语法 == <pre> animation-delay: time;</pre> {| class="table table-striped table-hover" ! 值 ! 描述 ! 测试 |- | time | 可选。定义动画开始前等待的时间,以秒或毫秒计。默认值为0 | [[playit.php?f=animation delay&preval=1s|测试 »]] |} == 更多实例 == 负值,请注意动画跳过 2 秒进入动画周期: <sample title="" desc="" lang="html" hererun="1"> animation-delay: -2s /* Opera */ -moz-animation-delay: -2s /* Firefox */ -webkit-animation-delay: -2s /* Safari 和 Chrome */ </sample> <run name=""> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>小白教程(xiaobai.wang)</title> <style> div { width:100px; height:100px; background:red; position:relative; animation:mymove 5s infinite; animation-delay:-2s; /*Safari 和 Chrome*/ -webkit-animation:mymove 5s infinite; -webkit-animation-delay:-2s; } @keyframes mymove { from {left:0px;} to {left:200px;} } @-webkit-keyframes mymove /*Safari 和 Chrome*/ { from {left:0px;} to {left:200px;} } </style> </head> <body> <p><strong>注意:</strong>animation-delay 属性不兼容 Internet Explorer 9以及更早版本的浏览器。</p> <div></div> </body> </html> </run> == 相关文章 == CSS3 教程: [[css3 animations|CSS3 动画]]
返回至“
Css3 pr animation delay
”。
上一节:
Css3_pr_animation_timing_function
下一节:
Css3_pr_animation_iteration_count