<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" type="text/css" href="../css/new_file.css" />
</head>
<body>
<div class="container">
<div class="box">
<div class="box1 box2"></div>
<div class="box1 box3"></div>
<div class="box1 box4"></div>
<div class="box1 box5"></div>
</div>
<div class="gan"></div>
</div>
</body>
</html>
.container {
border: 0px solid red;
width: 700px;
height: 600px;
margin: 30px auto;
}
.box {
border: 0px solid red;
width: 200px;
height: 200px;
margin: 20px auto;
animation: animation1 2s linear infinite;
}
.box1 {
width: 100px;
height: 50px;
border-radius: 50px 50px 0 0;
position: relative;
}
@keyframes animation1 {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
.box2 {
border: 0px solid greenyellow;
background-color: blue;
transform: rotate(90deg);
position: relative;
top: 25px;
left: 75px;
}
.box3 {
border: 0px solid blue;
background-color: red;
transform: rotate(180deg);
position: relative;
left: 100px;
top: 50px;
}
.box4 {
border: 0px solid red;
background-color: orangered;
transform: rotate(270deg);
position: relative;
left: 25px;
top: 25px;
}
.box5 {
border: 0px solid orangered;
background-color: greenyellow;
transform: rotate(0deg);
position: relative;
bottom: 100px;
}
.gan {
border: 2px solid saddlebrown;
width: 10px;
height: 400px;
background-color: #008000;
position: relative;
left: 345px;
bottom: 121px;
z-index: -1;
}
- 注:这个风车会 rotating,自行脑补吧,哈哈(其实是因为我不会放动图)