<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>动画</title>
<style>
.box-1{
width: 500px;
height: 500px;
background-color: #f40;
}
@keyframes qq{
0%{ background-color:#f40;}
25%{background-color: #000;}
50%{ background-color:#eee;}
100%{background-color:#786; }
}
div{
animation: qq 3s ease-out ;
animation-iteration-count:3;
}
</style>
</head>
<body>
<div class="box-1"></div>
</body>
</html>
这是一个只有简单颜色变化的正方块,