说不多说,代码走起!
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
div{ width:50px; height:50px; border: radius 20px; background-color:blue;
animation: myYun 10S;}
@keyframes myYun{
0%{margin-top: 300px;background-color: blue;transform: rotate(0deg);}
50%{ margin-top: 30px; background-color: red;transform: rotate(720deg);}
100%{ margin-top: 0px;background-color: blue;transform: rotate(0deg);}
}
</style>
</head>
<body>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</body>
</html>