<style>
.t5{
transition: 5s ease-out all; /*过渡 ease in 加速 out减速*/
}/*transition-delay延迟*/
.t5:hover{
transform: skew(45deg,45deg)
}
@keyframes key {
0%{
background-color: red;width: 200px;height: 200px;
}
25%{
background-color: orange;width: 100px;height: 100px;transform: rotate(-90deg);
}
50%{
background-color: yellow;width: 60px;height: 60px;transform: none;
}
75%{
background-color: green;width: 120px;height: 120px;transform: none;
}
100%{
background-color: blue;width: 200px;height: 200px;transform: rotate(360deg);
}
}
.kt{
animation:key 1s;
/* animation-iteration-count: infinite;*//*无限循环*/
background-color: yellow;
width: 200px;height: 200px;
}
style>
<div class="kt t5">div>