css+div实现风力发电风车动画效果代码
代码语言:html
所属分类:动画
代码描述:css+div实现风力发电风车动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
.turbine {
position: relative;
margin-bottom: 100px;
z-index: 1;
}
.cone {
width: 50px;
height: 50px;
background: white;
border-radius: 50px;
position: absolute;
left: -10px;
top: -15px;
z-index: 2;
box-shadow: inset 0px 0px 10px rgba(0, 0, 0, 0.1);
}
.blades {
position: relative;
z-index: 1;
top: -5px;
left: -135px;
transform-origin: 150px 15px;
animation: 4s windy linear infinite;
}
@keyframes windy {
to {
transform: rotate(-360deg);
}
}
.blades .blade {
width: 300px;
height: 30px;
background: white;
position: absolute;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
border-radius: 0 0 0 100%;
}
.blades .blade:nth-of-type(1) {
transform: rotate(-30deg) translate(-150px);
}
.blades .blade:nth-of-type(2) {
transform: rotate(30deg) translate(150px);
border-radius: 0 100% 0 0;
}
.blades .blade:nth-of-type(3) {
transform: rotate(90deg) translate(-150px);
}
.tower {
background: linear-grad.........完整代码请登录后点击上方下载按钮下载查看
网友评论0