拖动竖线实现和谐发展与破坏自然切换效果

代码语言: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: #654b00;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.green-ecosystem .tree4 .branch::before {
  position: absolute;
  content: "";
  width: 2px;
  height: 10px;
  background-color: #654b00;
  left: -4px;
  transform: rotateZ(-45deg);
  top: 4px;
  border-top-right-radius: 2px;
}

.green-ecosystem .tree4 .branch::after {
  position: absolute;
  content: "";
  width: 1.5px;
  height: 12px;
  background-color: #654b00;
  left: 4px;
  transform: rotateZ(45deg);
  top: 1px;
  border-top-right-radius: 5px;
  /* border-bottom-right-radius: 0px; */
  border-top-left-radius: 5px;
}

.green-ecosystem .tree4::before {
  position: absolute;
  content: "";
  width: 23px;
  height: 23px;
  background-color: #bcd663;
  border-radius: 50%;
  top: -21px;
  left: -12px;
}

.green-ecosystem .tree4::after {
  position: absolute;
  content: "";
  width: 28px;
  height: 28px;
  background-color: #bcd663;
  border-radius: 50%;
  top: -11px;
  left: -14px;
}

.green-ecosystem .tree7 {
  position: absolute;
  background: #00a388;
  background-image: linear-gradient(45deg, #609545 40%, #84c25e 40%);
  width: 40px;
  height: 64px;
  border-radius: 70px 70px 60px 50px;
  top: 36rem;
  left: 29.65rem;
  width: 24px;
  height: 59px;
  border-radius: 50% 50% 10px 10px;
}

.green-ecosystem .tree7::before {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 10px;
  width: 4px;
  height: 15px;
  background: #674d00;
}

.green-ecosystem .tree6 {
  position: absolute;
  background: #00a388;
  background-image: linear-gradient(45deg, #037549 40%, #00a254 40%);
  width: 40px;
  height: 71px;
  border-radius: 70px 70px 60px 50px;
  border-radius: 74% 71% 19px 20px;
  top: 34rem;
  left: 31rem;
}

.green-ecosystem .tree6::before {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 18px;
  width: 6px;
  height: 16px;
  background: #674d00;
}

.green-ecosystem .sun {
  position: absolute;
  border-radius: 50%;
  width: 10rem;
  height: 10rem;
  top: 16rem;
  left: 10rem;
  position: absolute;
  background: #fff054;
  top: 15%;
  right: 30%;
  /* width: 140px; */
  /* height: 140px; */
  border-radius: 50%;
  box-shadow: 0px 0px 30px 15px #fff9ba;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    animation-timing-function: ease-in;
  }
  50% {
    transform: scale(1.2);
    animation-timing-function: ease-out;
  }
  100% {
    transform: scale(1);
  }
}

.green-ecosystem .cloud2 {
  width: 6rem;
  height: 1.2rem;
  background-color: #fffefe;
  position: absolute;
  top: 26.75rem;
  left: 8.5rem;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  box-shadow: -3px -3px 0 #fefde3 inset;
}

.green-ecosystem .cloud2::before {
  position: absolute;
  content: "";
  width: 36px;
  height: 3rem;
  border-radius: 50%;
  background: #fffefe;
  top: -18px;
  left: 1rem;
  box-shadow: -3px -10px 0 #fefde3 inset;
}

.green-ecosystem .cloud1 {
  width: 7rem;
  height: 1.2rem;
  background-color: #a4e5ff;
  position: absolute;
  top: 35.75rem;
  left: 5.5rem;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  box-shadow: -3px -10px 0 #93dafc inset;
}

.green-ecosystem .cloud1::before {
  width: 5.15rem;
  height: 1.2rem;
  content: "";
  top: -1.1rem;
  left: 1rem;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  background: #a4e5ff;
  position: absolute;
  box-shadow: -3px -10px 0 #93dafc inset;
}

.green-ecosystem .cloud1::after {
  position: absolute;
  content: "";
  width: 30px;
  height: 3rem;
  border-radius: 50%;
  background: #a4e5ff;
  top: -22px;
  left: 21px;
  box-shadow: -3px -10px 0 #93dafc inset;
}

.green-ecosystem .clo.........完整代码请登录后点击上方下载按钮下载查看

网友评论0