css实现海上渔船飘动与鱼儿戏水鸟儿飞翔白云飘飘效果代码

代码语言:html

所属分类:动画

代码描述:css实现海上渔船飘动与鱼儿戏水鸟儿飞翔白云飘飘效果代码

代码标签: 渔船 飘动 鱼儿 戏水 鸟儿 飞翔 白云 飘飘 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >

<head>

  <meta charset="UTF-8">
  

  
<style>
body{
	width: 100%;
	display: block;
	min-height: 100vh;
	background-color: #fee300;
}
.section-center{
	position: relative;
	width: 600px;
	height: 450px;
	display: block;
	z-index: 6;
	margin: 0 auto;
	overflow: hidden;
}
.section-up{
	position: absolute;
	width: 100%;
	height: 270px;
	left: 0;
	top: 0;
	display: block;
	z-index: 5;
}
.hill{
	position: absolute;
	width: 115px;
	height: 27px;
	left: 30px;
	bottom: 0;
	display: block;
	z-index: 15;
}
.hill.snd{
	left: 115px;
	z-index: 14;
}
.hill.trd{
	transform: rotateY(180deg);
	left: auto;
	right:30px;
}
.hill.frt{
	transform: rotateY(180deg);
	left: auto;
	right: 110px;
	z-index: 14;
}
.hill span{
	position: absolute;
	width: 60px;
	height: 60px;
	background-color: #fff;
	left: 4px;
	top: 0;
	display: block;
	border-radius: 50%;
	border: 2px solid #030308;
	border-color: #030308 transparent transparent transparent;
}
.hill span:nth-child(2){
	width: 110px;
	height: 110px;
	left: -6px;
	top: -5px;
	background-color: transparent;
	transform: rotate(5deg);
	border-color: transparent transparent transparent #030308;
}
.hill span:nth-child(3){
	width: 10px;
	height: 10px;
	left: 2px;
	top: 22px;
	transform: rotate(-55deg);
	border: none;
	border-radius: 0;
}
.hill span:nth-child(4){
	width: 40px;
	height: 40px;
	left: auto;
	top: 11px;
	right: 5px;
	border-color: #030308 transparent transparent transparent;
}
.hill span:nth-child(5){
	width: 110px;
	height: 110px;
	left: auto;
	top: 3px;
	right: -8px;
	background-color: transparent;
	transform: rotate(85deg);
	border-color: #030308 transparent transparent transparent;
}
.hill span:nth-child(6){
	width: 24px;
	height: 24px;
	left: auto;
	top: -5px;
	right: 31px;
	background-color: transparent;
	border-color: transparent transparent #030308 transparent;
}
.hill span:nth-child(7){
	width: 17px;
	height: 4px;
	left: auto;
	top: 10px;
	right: 49px;
	background-color: transparent;
	border-radius: 0;
	transform: rotate(33deg);
	border-color: #030308 transparent transparent transparent;
}
.hill span:nth-child(8){
	width: 20px;
	height: 10px;
	left: 65px;
	top: 21px;
	transform: rotate(-35deg);
	border: none;
	border-radius: 0;
}
.hill span:nth-child(9){
	width: 30px;
	height: 10px;
	left: 46px;
	top: 15px;
	transform: rotate(33deg);
	border: none;
	border-radius: 0;
}
.hill span:nth-child(10){
	width: 20px;
	height: 10px;
	left: 60px;
	top: 19px;
	border: none;
	border-radius: 0;
}
.hill span:nth-child(11){
	width: 20px;
	height: 10px;
	left: 101px;
	top: 29px;
	border: none;
	border-radius: 0;
	transform: rotate(45deg);
}
.left-tree{
	position: absolute;
	width: 20px;
	height: 33px;
	left: 33px;
	bottom: 8px;
	display: block;
	z-index: 10;
	transform: rotate(11deg) skewX(3deg);
	transform-origin: center bottom;
	animation: moveTree 1.6s ease infinite;
}
@keyframes moveTree {
  0%,100% { 
		transform: rotate(11deg) skewX(3deg);  
  }
  50% { 
		transform: rotate(-11deg) skewX(-3deg); 
  }
  100% { 
		transform: rotate(11deg) skewX(3deg); 
  }
}
.left-tree span{
	position: absolute;
	width: 20px;
	height: 20px;
	left: 0;
	top: 0;
	border-radius: 50%;
	border: 2px solid #030308;
	background-color: #fff;
}
.left-tree span:nth-child(2){
	width: 2px;
	height: 25px;
	left: 9px;
	top: auto;
	bottom: 0;
	border-radius: 0;
	border: none;
	background-color: #030308;
}
.left-tree span:nth-child(3){
	width: 2px;
	height: 5px;
	left: 7px;
	top: auto;
	bottom: 20px;
	border-radius: 0;
	border: none;
	background-color: #030308;
	transform: rotate(-45deg);
}
.left-tree span:nth-child(4){
	width: 2px;
	height: 5px;
	left: 11px;
	top: auto;
	bottom: 17px;
	border-radius: 0;
	border: none;
	background-color: #030308;
	transform: rotate(45deg);
}
.right-tree{
	position: absolute;
	width: 20px;
	height: 33px;
	right: 25px;
	bottom: 3px;
	display: block;
	z-index: 10;
	transform: rotate(11deg) skewX(3deg);
	transform-origin: center bottom;
	animation: moveTree 1.6s ease infinite;
}
.right-tree span{
	position: absolute;
	width: 18px;
	height: 18px;
	left: 1px;
	top: 2px;
	border-radius: 50%;
	border: 2px solid #030308;
	background-color: #fff;
}
.right-tree span:nth-child(2){
	width: 2px;
	height: 25px;
	left: 9px;
	top: auto;
	bottom: 0;
	border-radius: 0;
	border: none;
	background-color: #030308;
}
.right-tree span:nth-child(3){
	width: 2px;
	height: 5px;
	left: 7px;
	top: auto;
	bottom: 20px;
	border-radius: 0;
	border: none;
	background-color: #030308;
	transform: rotate(-45deg);
}
.right-tree span:nth-child(4){
	width: 2px;
	height: 5px;
	left: 11px;
	top: auto;
	bottom: 17px;
	border-radius: 0;
	border: none;
	background-color: #030308;
	transform: rotate(45deg);
}
.right-tree span:nth-child(5){
	position: absolute;
	width: 14px;
	height: 14px;
	left: 3px;
	top: -6px;
	border-radius: 50%;
	border: 2px solid #030308;
	background-color: #fff;
	border-bottom-color:transparent;
}
.building-left{
	position: absolute;
	left: 62px;
	bottom: 3px;
	display: block;
	z-index: 9;
}
.building-left span{
	position: absolute;
	left: 0;
	bottom: 0;
	border: 2px solid #030308;
	background-color: #fff;
	width: 17px;
	height: 42px;
}
.building-left span:nth-child(2){
	left: 20px;
	width: 30px;
	height: 64px;
}
.building-left span:nth-child(3){
	left: 23px;
	bottom: 62px;
	width: 24px;
	height: 9px;
}
.building-left span:nth-child(4){
	left: 54px;
	width: 20px;
	height: 46px;
}
.building-left span:nth-child(5){
	left: 56px;
	bottom: 44px;
	width: 16px;
	height: 7px;
}
.building-left span:nth-child(6){
	left: 2px;
	bottom: 27px;
	border: none;
	background-color: #030308;
	width: 6px;
	height: 2px;
}
.building-left span:nth-child(7){
	left: 22px;
	bottom: 44px;
	border: none;
	background-color: #030308;
	width: 11px;
	height: 2px;
}
.building-left span:nth-child(8){
	left: 39px;
	bottom: 20px;
	border: none;
	background-color: #030308;
	width: 11px;
	height: 2px;
}
.building-left span:nth-child(9){
	left: 56px;
	bottom: 31px;
	border: none;
	background-color: #030308;
	width: 8px;
	height: 2px;
}
.building-left span:nth-child(10){
	left: 29px;
	bottom: 71px;
	border: none;
	background-color: #030308;
	width: 2px;
	height: 17px;
}
.building-left span:nth-child(11){
	left: 39px;
	bottom: 71px;
	border: none;
	background-color: #030308;
	width: 2px;
	height: 17px;
}
.building-right{
	position: absolute;
	right: 67px;
	bottom: 0;
	display: block;
	z-index: 8;
}
.building-right span{
	position: absolute;
	right: 18px;
	bottom: 0;
	border: 2px solid #030308;
	backgro.........完整代码请登录后点击上方下载按钮下载查看

网友评论0