当前阅读教程:CSS3教程 > animation-iteration-count 属性 | |||||||||||||||
阅读(22555525) 收藏 赞(5685) 分享 | |||||||||||||||
上一篇: animation-delay 属性 | 下一篇: animation-direction 属性 | ||||||||||||||
浏览器支持表格中的数字表示支持该属性的第一个浏览器版本号。 紧跟在 -webkit-, -ms- 或 -moz- 前的数字为支持该前缀属性的第一个浏览器版本号。 标签定义及使用说明animation-iteration-count属性定义动画应该播放多少次。
语法animation-iteration-count: value;
实例播放三次动画 <!doctype html> <html> <head> <meta charset="utf-8"> <title>animation-iteration-count 属性</title> <!--定义内部样式--> <style> div { width:100px; height:100px; background:red; position:relative; animation:mymove 3s; animation-iteration-count:3;/*播放三次动画*/ /* Safari and Chrome */ -webkit-animation:mymove 3s; -webkit-animation-iteration-count:3; } @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> Internet Explorer 9 及更早 IE 版本浏览器不支持 animation-iteration-count 属性。</p> <div></div> </body> </html> |
|||||||||||||||
上一篇: animation-delay 属性 | 下一篇: animation-direction 属性 |