小白教程
所有教程
关于
Search
172.70.100.62
172.70.100.62
参数设置
贡献
退出
操作
编辑
移动
保护
信息
历史
删除
查看“Css3 pr animation duration”的源代码
本页内容
上一节:
Css3_pr_animation_name
下一节:
Css3_pr_animation_timing_function
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{DISPLAYTITLE:animation-duration}}[[Category:css reference|33]] = CSS3 animation-duration 属性 = 设置动画在两秒内完成: <sample title="" desc="" lang="html" hererun="1"> animation-duration:2s; -webkit-animation-duration:2s; /* Safari 和 Chrome */ </sample> <run name=""> <html><!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>小白教程(xiaobai.wang)</title> <style> div { width:100px; height:100px; background:red; position:relative; animation:mymove infinite; animation-duration:2s; /* Safari and Chrome */ -webkit-animation:mymove infinite; -webkit-animation-duration:2s; } @keyframes mymove { from {top:0px;} to {top:200px;} } @-webkit-keyframes mymove /* Safari and Chrome */ { from {top:0px;} to {top:200px;} } </style> </head> <body> <p><strong>注意:</strong> animation-duration属性不兼容 Internet Explorer 9 以及更早版本的浏览器.</p> <div></div> <p><b>注意:</b> 要指定动画属性。否则时间若是0,动画不会进行。</p> </body> </html> </run> == 浏览器支持 == 表格中的数字表示支持该属性的第一个浏览器版本号。 紧跟在 -webkit-, -ms- 或 -moz- 前的数字为支持该前缀属性的第一个浏览器版本号。 {| class="table table-striped table-hover" ! 属性 ! Chrome ! Internet Explorer / Edge ! Firefox ! Safari ! Opera |- | animation-duration | 43.03.0 -webkit- | 10.0 | 16.05.0 -moz- | 9.04.0 -webkit- | 30.015.0 -webkit-12.0 -o- |} == 标签定义及使用说明 == animation-duration属性定义动画完成一个周期需要多少秒或毫秒。 {| class="table table-striped table-hover" | 默认值: | 0 |- | 继承: | no |- | 版本: | CSS3 |- | JavaScript 语法: | object object.style.animationDuration="3s" |} == 语法 == <pre> animation-duration: time;</pre> {| class="table table-striped table-hover" ! 值 ! 说明 |- | time | 指定动画播放完成花费的时间。默认值为 0,意味着没有动画效果。 |} == 相关文章 == CSS3 教程: [[css3 animations|CSS3 动画]]
返回至“
Css3 pr animation duration
”。
上一节:
Css3_pr_animation_name
下一节:
Css3_pr_animation_timing_function