利用html和css3写的一个大风车


这是css代码:

#one:hover {
animation: run 0.0001s linear infinite;
}

@keyframes run {
from {
transform: rotate(360deg);
}

to {
transform: rotate(0deg);
}
}
.sj {
margin-top: 5px;
transform: rotate(-46deg);
position: absolute;
top: 15px;
left: -49px;
float: left;
width: 0;
height: 0;
z-index: 2;
border: 50px solid lightcoral;
border-color: lightcoral transparent transparent transparent;
}
.ye {
transform: rotate(0deg);
position: absolute;
left: 0px;
top: 0 ;
float: left;
width: 0;
height: 0;
border: 80px solid #D9B300;
z-index: 2;
border-color: transparent transparent transparent #D9B300;
}
.ye1 {
transform: rotate(0deg);
position: absolute;
left: -80px;
top: 78px;
float: left;
width: 0;
height: 0;
z-index: 2;
border: 80px solid orange;
border-color: transparent orange transparent transparent;
}
.re {
transform: rotate(-46deg);
position: absolute;
left: 20px;
top: -60px;
float: left;
z-index: 2;
width: 0;
height: 0;
border: 59px solid brown;
border-color: transparent transparent transparent brown;
}
.blue {
transform: rotate(0deg);
position: absolute;
left: 80px;
top: -79px;
float: left;
width: 0;
height: 0;
z-index: 2;
border: 80px solid cornflowerblue;
border-color: transparent transparent transparent cornflowerblue;
}
.blue1 {
transform: rotate(-44deg);
position: absolute;
left: 102px;
top: 23px;
float: left;
width: 0;
height: 0;
z-index: 2;
border: 58px solid lightblue;
border-color: lightblue transparent transparent transparent;
animation: gg 1s linear infinite;
}
.green {
transform: rotate(0deg);
position: absolute;
left: 80px;
top: 80px;
z-index: 2;
float: left;
width: 0;
height: 0;
border: 81px solid #01814A;
border-color: #01814A transparent transparent transparent;
z-index: 2;

}
.green1 {
transform: rotate(-45deg);
position: absolute;
top: 103px;
left: 23px;
float: left;
width: 0;
height: 0;
border: 57px solid seagreen;
border-color: transparent seagreen transparent transparent;
z-index: 2;
}
#one {
margin: 150px auto auto auto;
width: 162px;
transform: rotate(-45deg);
height: 162px;
line-height: 168px;
text-align: center;
position: relative;
z-index: 3;
animation: run 9s linear infinite;
}

这是html代码:

大风车支悠悠的转,这里的风景真好看












提示鼠标放到上面它会转的更快

相关