css+div实现风力发电风车动画效果代码

代码语言:html

所属分类:动画

代码描述:css+div实现风力发电风车动画效果代码

代码标签: 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-gradient(to right, #ddd, #fff, #fff, #ddd);
	box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.01);
	width: 30px;
	height: 600px;
	z-index: 0;
	position: relative;
}

.secondary-left,
.secondary-right {
	transform: scale(0.66);
	transform-origin: bottom;
	z-index: 0;
}
.secondary-left {
	margin-right: 400px;
}
.secondary-right {
	margin-left: 400px;
}

.field {
	position: absolute;
	left: 0;
	width: 100vw;
	height: 100px;
	background: linear-gradient(to bottom, #5f8d4e, #285430);
	z-index: 3;
}

body {
	background: linear-gradient(to bottom, #757a.........完整代码请登录后点击上方下载按钮下载查看

网友评论0