拖动竖线实现和谐发展与破坏自然切换效果
代码语言:html
所属分类:布局界面
代码描述:拖动竖线实现和谐发展与破坏自然切换效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
/* Variables */
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
html {
font-size: 10px;
}
body {
height: 100vh;
width: 100vw;
display: flex;
justify-content: center;
align-items: center;
background-color: black;
}
.hide {
display: none !important;
}
.wrapper {
width: 75rem;
height: 70rem;
position: relative;
background-size: 100% 100%;
background-repeat: no-repeat;
}
.green-ecosystem {
width: 75rem;
height: 70rem;
display: flex;
overflow: hidden;
position: absolute;
opacity: 1;
}
.green-ecosystem .left {
width: 100%;
height: 100%;
background-color: #d4eff9;
position: relative;
}
.sea {
width: 40rem;
height: 19rem;
background: red;
position: absolute;
top: 47.65rem;
left: 17rem;
border-bottom-left-radius: 20rem;
border-bottom-right-radius: 20rem;
overflow: hidden;
}
.sea .lower {
position: absolute;
width: 100%;
height: 12rem;
background: #66b8c0;
top: 9rem;
}
.sea .upper {
background: #b9e3f3;
width: 100%;
height: 100%;
}
.sea .upper .water {
width: 9.5rem;
height: 1.4rem;
position: absolute;
background: #89d2e1;
top: 3rem;
border-radius: 10px;
left: 3rem;
}
.sea .upper .water::after {
position: absolute;
content: "";
height: 1.2rem;
width: 3.5rem;
border-radius: 10px;
background-color: #89d2e1;
right: -8px;
top: 27px;
}
.sea .upper .water::before {
position: absolute;
content: "";
height: 1.3rem;
width: 5rem;
background-color: #89d2e1;
border-radius: 10px;
top: 4rem;
right: -7rem;
}
.sea .upper .waves {
position: absolute;
width: 10rem;
height: 7px;
background: blue;
background-repeat: repeat;
height: 6.6666666667px;
background-size: 20px 22px;
background-image: radial-gradient(
circle at 10.666667px -4.333333px,
transparent 11px,
#5773a5 0px
),
radial-gradient(
circle at 11.666667px 5.666667px,
transparent 11px,
#5773a5 0px
);
top: 3rem;
left: 14rem;
}
.green-ecosystem .tree1 {
width: 1.35px;
height: 4rem;
position: absolute;
background-color: #654b00;
top: 40rem;
left: 131px;
}
.green-ecosystem .tree1::before {
position: absolute;
content: "";
width: 15px;
height: 15px;
background-color: #bcd663;
border-radius: 50%;
top: -15px;
left: -7px;
}
.green-ecosystem .tree1::after {
position: absolute;
content: "";
width: 20px;
height: 20px;
background-color: #bed563;
border-radius: 50%;
top: -8px;
left: -10px;
}
.green-ecosystem .tree2 {
width: 1.35px;
height: 4rem;
position: absolute;
background-color: brown;
top: 40rem;
left: 165px;
}
.green-ecosystem .tree2::before {
position: absolute;
content: "";
width: 20px;
height: 20px;
background-color: #bcd663;
border-radius: 50%;
top: -8px;
left: -10px;
}
.green-ecosystem .tree2::after {
position: absolute;
content: "";
width: 15px;
height: 15px;
background-color: #bcd663;
border-radius: 50%;
top: -15px;
left: -7px;
}
.green-ecosystem .tree3 {
width: 2px;
height: 4rem;
position: absolute;
background-color: #654b00;
top: 40rem;
left: 144.5px;
}
.green-ecosystem .tree3::before {
position: absolute;
content: "";
width: 25px;
height: 25px;
background-color: #81c35c;
border-radius: 50%;
top: -18px;
left: -12px;
}
.green-ecosystem .tree3::after {
position: absolute;
content: "";
width: 20px;
height: 20px;
background-color: #81c35c;
border-radius: 46%;
top: -28px;
left: -10px;
}
.green-ecosystem .tree3 .branch {
top: -13px;
position: absolute;
z-index: 3;
width: 2px;
height: 2rem;
background-color: #654b00;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
}
.green-ecosystem .tree3 .branch::after {
position: absolute;
content: "";
width: 1px;
height: 12px;
background-color: #654b00;
left: 4px;
transform: rotateZ(45deg);
top: 2px;
border-top-right-radius: 2px;
border-bottom-right-radius: 2px;
}
.green-ecosystem .tree3 .branch::before {
position: absolute;
content: "";
width: 1px;
height: 12px;
background-color: #654b00;
left: -4px;
transform: rotateZ(-45deg);
top: 4px;
border-top-right-radius: 2px;
}
.green-ecosystem .tree9 {
position: absolute;
background: #00a388;
background-image: linear-gradient(45deg, #008735 40%, #00b64a 40%);
width: 40px;
height: 64px;
border-radius: 70px 70px 60px 50px;
top: 35rem;
left: 21rem;
}
.green-ecosystem .tree9::before {
content: "";
position: absolute;
bottom: -15px;
left: 16px;
width: 8px;
height: 15px;
background: #674d00;
}
.green-ecosystem .tree8 {
position: absolute;
background: #00a388;
background-image: linear-gradient(45deg, #027647 40%, #00a251 40%);
width: 40px;
height: 64px;
border-radius: 70px 70px 60px 50px;
top: 36rem;
left: 24rem;
width: 20px;
height: 58px;
border-radius: 50% 50% 10px 10px;
}
.green-ecosystem .tree8::before {
content: "";
position: absolute;
bottom: -15px;
left: 8px;
width: 4px;
height: 15px;
background: #674d00;
}
.green-ecosystem .tree4 {
width: 2px;
height: 4rem;
position: absolute;
background-color: #654b00;
top: 39rem;
left: 188.5px;
}
.green-ecosystem .tree4 .branch {
top: -3px;
position: absolute;
z-index: 3;
width: 2px;
height: 2rem;
background-color: #.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0