<!DOCTYPE html>
<html>
<head>
<style>
@keyframes myfirst
{
from{
width:65px;
height:40px;
background:#92B901;
color:#ffffff;
font-weight:bold;
font:12px '微软雅黑', Verdana, Arial, Helvetica, sans-serif;
opacity:0.4;
}
to{
transform: rotate(360deg);
opacity:1;
background:#1ec7e6;
width:90px;
height:60px;
font-size:16px;
}
}
div{
animation:myfirst 1s;
animation-iteration-count:2;
animation-direction:alternate;
width:65px;
height:40px;
background:#92B901;
color:#ffffff;
position:absolute;
font-weight:bold;
font:12px '微软雅黑', Verdana, Arial, Helvetica, sans-serif;
padding:20px 10px 0px 10px;
margin:5px;
border-radius:5px;
opacity:0.4;
}
span{
position:absolute;
left:23px;
top:50px;
}
</style>
</head>
<body>
<span>动画演示</span>
<div class="animated_div">CSS3过渡</div>
</body>
</html>