css+svg布局实现熔岩灯效果代码

代码语言:html

所属分类:布局界面

代码描述:css+svg布局实现熔岩灯效果代码

代码标签: 熔岩 效果

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

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

<head>

  <meta charset="UTF-8">

  
  
  
  
<style>
body {
  background: rgb(0, 49, 20);
  background: radial-gradient(
    circle,
    rgba(0, 49, 20, 1) 10%,
    rgba(0, 16, 8, 1) 25%,
    rgba(0, 0, 0, 1) 100%
  );
  margin: 0;
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.lamp {
  height: 23rem;
  width: 12rem;
  position: relative;
  background: rgb(36, 154, 97);
  background: linear-gradient(
    90deg,
    rgba(36, 154, 97, 1) 10%,
    rgba(56, 170, 113, 1) 30%,
    rgba(36, 154, 97, 1) 55%
  );
  clip-path: polygon(30% 0, 70% 0, 100% 65%, 70% 100%, 30% 100%, 0 65%);
  z-index: 20;
}

.top-cover,
.bottom-cover {
  width: 100%;
  height: 17.5%;
  position: absolute;
}

.top-cover {
  background: rgb(24, 24, 24);
  background: linear-gradient(
    90deg,
    rgba(24, 24, 24, 1) 30%,
    rgba(37, 41, 36, 1) 45%,
    rgba(24, 24, 24, 1) 100%
  );
}

.bottom-cover {
  background: rgb(35, 40, 33);
  background: linear-gradient(
    90deg,
    rgba(35, 40, 33, 1) 25%,
    rgba(42, 50, 41, 1) 45%,
    rgba(35, 40, 33, 1) 63%
  );
  top: 85%;
}

.lamp-bottom {
  width: 0;
  height: 0;
  border-left: 6rem solid transparent;
  border-right: 6rem solid transparent;
  border-top: 6rem solid rgba(35, 40, 33, 1);
  border-radius: 50%;
  transform: rotate(180deg);
  position: fixed;
  top: 70%;
}

.blob1,
.blob2,
.blob3 {
  position: absolute;
  top: 0;
  left: 0;
  fill: #00ff73;
  z-index: -1;
}

.blob1 {
  width: 150px;
  animation: move 8s ease-in-out infinite;
  transform-origi.........完整代码请登录后点击上方下载按钮下载查看

网友评论0