console
<!DOCTYPE html>
<html>
<head>
<style>
div
{
top:200px;
width:100px;
height:0px;
background:red;
position:relative;
animation:mymove infinite;
animation-duration:1s;
animation-fill-mode:forwards; /* 动画结束后保留结束时的样式 */
animation-iteration-count:1; //动画只执行1次
}
@keyframes mymove
{
0% {height:0px;}
100% {height:100px;}
}
</style>
</head>
<body>
<p><strong>注释:</strong>Internet Explorer 9 以及更早的版本不支持 animation-name 属性。</p>
<div></div>
<p><b>注释:</b>始终规定 animation-duration 属性,否则时长为 0,就不会播放动画了。</p>
</body>
</html>