先来看效果:
媒体1
源代码在这:
<!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>
/* 行内以及行内块元素,如果html */
.windmill {
width: 410px;
height: 410px;
/* background-color: rgb(49, 90, 8); */
/* 使风车居中显示 */
font-size: 0px;
margin: 50px auto;
/* 过度 在一定的时间内完成这个动作 */
transition: all 5s;
}
.windmill div {
width: 200px;
height: 200px;
background-color: rgb(169, 231, 107);
display: inline-block;
}
.blade1 {
border-radius: 0px 100% 0px 100%;
}
.blade2 {
border-radius: 100% 0px 100% 0px;
}
.windmill:hover {
transform: rotate(3600deg);
}
</style>
</head>
<body>
<div class="windmill">
<div class="blade1"></div>
<div class="blade2"></div>
<div class="blade2"></div>
<div class="blade1"></div>
</div>
</body>
</html>