CSS3 animation-delay 屬性
實(shí)例
等待兩秒,然后開始動(dòng)畫:
animation-delay:2s;
-webkit-animation-delay:2s; /* Safari and Chrome */
-webkit-animation-delay:2s; /* Safari and Chrome */
嘗試一下 ?
在此頁底部有更多的例子。
瀏覽器支持
表格中的數(shù)字表示支持該屬性的第一個(gè)瀏覽器版本號(hào)。
緊跟在 -webkit-, -ms- 或 -moz- 前的數(shù)字為支持該前綴屬性的第一個(gè)瀏覽器版本號(hào)。
Property | |||||
---|---|---|---|---|---|
animation-delay | 43.0 4.0 -webkit- | 10.0 | 16.0 5.0 -moz- | 9.0 4.0 -webkit- | 30.0 15.0 -webkit- 12.0 -o- |
標(biāo)簽定義及使用說明
animation-delay 屬性定義動(dòng)畫什么時(shí)候開始。
animation-delay 值單位可以是秒(s)或毫秒(ms)。
提示: 允許負(fù)值,-2s 使動(dòng)畫馬上開始,但跳過 2 秒進(jìn)入動(dòng)畫。
默認(rèn)值: | 0 |
---|---|
繼承: | no |
版本: | CSS3 |
JavaScript 語法: | object object.style.animationDelay="2s" |
語法
animation-delay: time;
值 | 描述 | 測試 |
---|---|---|
time | 可選。定義動(dòng)畫開始前等待的時(shí)間,以秒或毫秒計(jì)。默認(rèn)值為0 | 測試 ? |

更多實(shí)例
實(shí)例
負(fù)值,請(qǐng)注意動(dòng)畫跳過 2 秒進(jìn)入動(dòng)畫周期:
animation-delay: -2s /* W3C and Opera */
-moz-animation-delay: -2s /* Firefox */
-webkit-animation-delay: -2s /* Safari and Chrome */
-moz-animation-delay: -2s /* Firefox */
-webkit-animation-delay: -2s /* Safari and Chrome */
嘗試一下 ?
相關(guān)文章
CSS3 教程: CSS3 動(dòng)畫
更多建議: