animation
英[ˌænɪˈmeɪʃn] 美[ˌænəˈmeʃən]
n.生氣,活潑;卡通製作,卡通攝製;[影視]卡通片
複數: animations
iteration
英[ˌɪtəˈreɪʃn] 美[ˌɪtəˈreʃən]
##n.反覆;重述;的事;[電腦]循環count
英[kaʊnt] 美[kaʊnt] n.總數;數數;罪狀;論點v.數數;計算總數;把…算入;重要第三人稱單數: counts 複數: counts 現在分詞: counting 過去式: counted 過去分詞: counted#
CSS 動畫迭代計數屬性 語法
animation-iteration-count屬性怎麼用?
animation-iteration-count屬性是用來定義動畫播放次數的;設定animation-iteration-count屬性的值為infinite,就可實現動畫的無限循環播放。
作用:animation-iteration-count 屬性定義動畫的播放次數。
語法:animation-iteration-count: n|infinite;
說明:n 定義動畫播放次數的數值。 infinite 規定動畫應該無限次播放。
註解:Internet Explorer 9 以及更早的版本不支援 animation-iteration-count 屬性。
CSS 動畫迭代計數屬性 範例
<!DOCTYPE html>
<html>
<head>
<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 以及更早的版本不支持 animation-iteration-count 属性。</p>
<div></div>
</body>
</html>執行實例 »
點擊 "執行實例" 按鈕查看線上實例

