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