css3 animation-name property


  Translation results:

animation

英[ˌænɪˈmeɪʃn] 美[ˌænəˈmeʃən]

n. Angry, lively; cartoon production, cartoon shooting; [film and television] animation

Plural: animations

name

英[neɪm] 美[nem]

n. Name; reputation; have... name of; a famous person

vt. to determine; to decide; to name...; to name... Singular: names Plural: names Present participle: naming Past tense: named Past participle: named

css3 animation-name propertysyntax

Function: animation-name attribute specifies the name of @keyframes animation.

Syntax: animation-name: keyframename|none;
Description: keyframename specifies the name of the keyframe that needs to be bound to the selector. none specifies no animation effect (can be used to override animations from the cascade).​

Note: Please always specify the animation-duration attribute, otherwise the duration is 0 and the animation will not be played.

css3 The animation-name property is used to retrieve or set the animation name applied to the object. It must be used in conjunction with @keyframes, because the animation name is defined by @keyframes. If there are multiple attribute values, they can be separated by commas

css3 animation-name propertyexample

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

/* Safari and Chrome */
-webkit-animation-name:mymove;
-webkit-animation-duration:5s;
}

@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-name 属性。</p>

<div></div>

<p><b>注释:</b>始终规定 animation-duration 属性,否则时长为 0,就不会播放动画了。</p>

</body>
</html>

Run instance »

Click the "Run instance" button to view the online instance

Popular Recommendations

Home

Videos

Q&A