小白教程
所有教程
关于
Search
172.70.178.233
172.70.178.233
参数设置
贡献
退出
操作
编辑
移动
保护
信息
历史
删除
查看“Css3 pr animation”的源代码
本页内容
上一节:
Css3_pr_animation_keyframes
下一节:
Css3_pr_animation_name
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{DISPLAYTITLE:CSS animation}}[[Category:css reference|31]] = CSS3 animation(动画) 属性 = 使用简写属性把 animation 绑定到一个<div> 元素: <sample title="" desc="" lang="html" hererun="1"> div { animation:mymove 5s infinite; -webkit-animation:mymove 5s infinite; /* 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; -webkit-animation:mymove 5s infinite; /*Safari and Chrome*/ } @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> Internet Explorer 9 及更早IE版本不支持 animation 属性。</p> <div></div> </body> </html> </run> == 浏览器支持 == 表格中的数字表示支持该属性的第一个浏览器版本号。 紧跟在 -webkit-, -ms- 或 -moz- 前的数字为支持该前缀属性的第一个浏览器版本号。 {| class="table table-striped table-hover" ! 属性 ! Chrome ! Internet Explorer / Edge ! Firefox ! Safari ! Opera |- | animation | 43.04.0 -webkit- | 10.0 | 16.05.0 -moz- | 9.04.0 -webkit- | 30.015.0 -webkit-12.0 -o- |} {| class="table table-striped table-hover" | 默认值: | none 0 ease 0 1 normal |- | 继承: | no |- | 版本: | CSS3 |- | JavaScript 语法: | object.style.animation="mymove 5s infinite" |} == 语法 == <pre> animation: name duration timing-function delay iteration-count direction fill-mode play-state; </pre> {| class="table table-striped table-hover" ! 值 ! 说明 |- | [[css3 pr animation name|animation-name]] | 指定要绑定到选择器的关键帧的名称 |- | [[css3 pr animation duration|animation-duration]] | 动画指定需要多少秒或毫秒完成 |- | [[css3 pr animation timing function|animation-timing-function]] | 设置动画将如何完成一个周期 |- | [[css3 pr animation delay|animation-delay]] | 设置动画在启动前的延迟间隔。 |- | [[css3 pr animation iteration count|animation-iteration-count]] | 定义动画的播放次数。 |- | [[css3 pr animation direction|animation-direction]] | 指定是否应该轮流反向播放动画。 |- | [[css3 pr animation fill mode|animation-fill-mode]] | 规定当动画不播放时(当动画完成时,或当动画有一个延迟未开始播放时),要应用到元素的样式。 |- | [[css3 pr animation play state|animation-play-state]] | 指定动画是否正在运行或已暂停。 |- | initial | 设置属性为其默认值。 [[css initial|阅读关于 initial的介绍。]] |- | inherit | 从父元素继承属性。 [[css inherit|阅读关于 initinherital的介绍。]] |} == 相关文章 == CSS3 教程: [[css3 animations|CSS3 动画]]
返回至“
Css3 pr animation
”。
上一节:
Css3_pr_animation_keyframes
下一节:
Css3_pr_animation_name