animation

英 [??n??me??n]? ?美 [??n??me??n]??

n.生氣,活潑;動(dòng)畫片制作,動(dòng)畫片攝制;[影視]動(dòng)畫片

復(fù)數(shù): animations

delay

英 [d??le?]? ?美 [d??le]??

n.耽擱;延遲,拖延;被耽擱或推遲的時(shí)間

vt.耽擱;延期,推遲

vi.延緩,延期

第三人稱單數(shù): delays 現(xiàn)在分詞: delaying 過去式: delayed 過去分詞: delayed

css animation-delay屬性 語法

animation-delay屬性如何使用?

animation-delay 屬性定義動(dòng)畫什么時(shí)候開始,基本語法為:animation-delay: time。其中time值以秒(s)或毫秒(ms)計(jì)時(shí);允許負(fù)值,例:-2s 使動(dòng)畫馬上開始,但跳過 2 秒進(jìn)入動(dòng)畫。

作用:animation-delay 屬性定義動(dòng)畫何時(shí)開始。animation-delay 值以秒或毫秒計(jì)。

語法:animation-delay: time;

說明:time ? ?可選。定義動(dòng)畫開始前等待的時(shí)間,以秒或毫秒計(jì)。默認(rèn)值是 0,允許負(fù)值,例:-2s 使動(dòng)畫馬上開始,但跳過 2 秒進(jìn)入動(dòng)畫。? ??

注釋:Internet Explorer 9 以及更早的版本不支持 animation-delay 屬性。

css animation-delay屬性 示例

<!DOCTYPE html>
<html>
<head>
<style> 
div
{
width:100px;
height:100px;
background:red;
position:relative;
animation:mymove 5s infinite;
animation-delay:2s;

/*Safari and Chrome*/
-webkit-animation:mymove 5s infinite;
-webkit-animation-delay:2s;
}

@keyframes mymove
{
from {left:0px;}
to {left:200px;}
}

@-webkit-keyframes mymove /*Safari and Chrome*/
{
from {left:0px;}
to {left:200px;}
}
</style>
</head>
<body>

<p><strong>注釋:</strong>Internet Explorer 9 以及更早的版本不支持 animation-delay 屬性。</p>

<div></div>

</body>
</html>

運(yùn)行實(shí)例 ?

點(diǎn)擊 "運(yùn)行實(shí)例" 按鈕查看在線實(shí)例