animation-iteration-count From CSS3 previous page next page CSS3参考手册 » 属性列表 » 动画属性 » 相关内容: 其它动画属性参考 选择其它项 animation-iteration-count 版本:CSS3 继承性:无 语法: animation-iteration-count:infinite | <number> [ , infinite | <number> ]* 默认值:1 适用于:所有元素,包含伪对象:after和:before 继承性:无 取值: infinite: 无限循环 <number>: 指定对象动画的具体循环次数 说明: 检索或设置对象动画的循环次数 如果提供多个属性值,以逗号进行分隔。 对应的脚本特性为animationIterationCount。 兼容性: = 支持 = 不支持 = 部分支持 支持版本\类型 版本 6-9 4 5.1.7 13-23 11.5-11.6 版本 10 5-18 示例: <!DOCTYPE html> <html lang="zh-cn"> <head> <title>animation-iteration-count_CSS参考手册_web前端开发参考手册系列</title> <meta name="author" content="Joy Du(飘零雾雨), dooyoe@gmail.com, www.doyoe.com"> <style> h1{font-size:16px;} div{width:100px;height:100px;padding:10px;border-radius:61px;box-shadow:0 0 10px rgba(204,102,0,.8);background:#F6D66E;background:-moz-linear-gradient(top,#fff,#F6D66E);background:-webkit-linear-gradient(top,#fff,#F6D66E);background:-o-linear-gradient(top,#fff,#F6D66E);background:-ms-linear-gradient(top,#fff,#F6D66E);background:linear-gradient(top,#fff,#F6D66E); -moz-animation:animations 1.5s ease infinite; -webkit-animation:animations 1.5s ease infinite; -o-animation:animations 1.5s ease infinite; -ms-animation:animations 1.5s ease infinite; animation:animations 1.5s ease infinite; } @-webkit-keyframes animations{ 0%{box-shadow:0 0 10px rgba(204,102,0,.8);} 50%{box-shadow:0 0 10px rgba(204,102,0,.3);} 100%{box-shadow:0 0 10px rgba(204,102,0,.8);} } @-moz-keyframes animations{ 0%{box-shadow:0 0 10px rgba(204,102,0,.8);} 50%{box-shadow:0 0 10px rgba(204,102,0,.3);} 100%{box-shadow:0 0 10px rgba(204,102,0,.8);} } @-o-keyframes animations{ 0%{box-shadow:0 0 10px rgba(204,102,0,.8);} 50%{box-shadow:0 0 10px rgba(204,102,0,.3);} 100%{box-shadow:0 0 10px rgba(204,102,0,.8);} } @-ms-keyframes animations{ 0%{box-shadow:0 0 10px rgba(204,102,0,.8);} 50%{box-shadow:0 0 10px rgba(204,102,0,.3);} 100%{box-shadow:0 0 10px rgba(204,102,0,.8);} } @keyframes animations{ 0%{box-shadow:0 0 10px rgba(204,102,0,.8);} 50%{box-shadow:0 0 10px rgba(204,102,0,.3);} 100%{box-shadow:0 0 10px rgba(204,102,0,.8);} } </style> </head> <body> <h1>太阳光晕将不停的闪烁:</h1> <div></div> </body> </html> previous page start next page