The new attribute animation added in CSS3 is used to animate the element. But animation can't take the effect of animating it alone.
Use animation to invoke the animation effect function. For example, it will use the name of the dynamic effect, how long it takes to complete the dynamic effect, the action is performed only once or always loop.
Animation:myanimation 3s infinate;infinate is the meaning of infinite loops.
Use Keyframe to define animation effects.
@keyframe myanimation { from{animation code} to{animation code} }
I want to fly, I want to fly.
Ah ...
Who the hell dragged me down ...
1 </style>2 #cartoon {3 Background-color:yellow;4 height:100px;5 width:200px;6 animation:animationdiv 3s;7 }8 @keyframes Animationdiv {9 from{Ten Position:absolute; One top:500px; A left:0; - } - To { the Position:absolute; - top:100px; - left:500px; - } + } - </style> + <DivID= "Cartoon">I want to fly, I want to fly. <br> Ah ... Who the hell dragged me down ... <BR>TMD dragged me down ...</Div>
Reference
CSS3 New Style Big parse: [8]animation element animation
Animation of CSS