CSS3动画效果-7.13
例如:
<body>
<div class="div1"></div>
</body>
CSS:
@keyframes myfirst { (有的浏览器或者HTML版本过低就的加上-webkit-keyframes) | |
0% { | |
width: 150px; | |
} | |
30% { | |
width: 300px; | |
} | |
50% { | |
width: 500px; | |
} | |
100% { | |
width: 600px; | |
} | |
} | |
.div1 { | |
width: 150px; | |
height: 150px; | |
background-color: #21bbca; | |
/*-webkit-animation: myfirst 4s ease infinite;*/ | |
} | |