js实现液态液体流动背景动画效果代码

代码语言:html

所属分类:背景

代码描述:js实现液态液体流动背景动画效果代码

代码标签: js 液态 液体 流动 背景 动画

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

<!DOCTYPE html>
<html lang="en" >
<head>
  <meta charset="UTF-8">

<style>
    :root {
  font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color: black;
  background-color: whitesmoke;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  display: flex;
  place-items: center;
  min-width: 320px;
  min-height: 100vh;
}

.bouncing-blob {
  width: 32vw;
  aspect-ratio: 1;
  border-radius: 50%;
  will-change: transform;
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  transform-origin: left top;
}

.bouncing-blob--blue {
  background: #4783c7;
}

.bouncing-blob--white {
  background: #ffffff;
  z-index: 2;
  width: 15vw;
}

.bouncing-blob--purple {
  background: #8c8ff1;
}

.bouncing-blob--pink {
  background: #e289cd50;
}

.bouncing-blobs-container {
  position: fixed;
  z-index: -1;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.bouncing-blobs-glass {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(140px);
  -webkit-backdrop-filter: blur(140px);
  pointer-events: none;
}

.bouncing-blobs {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.hero h2 {
  font-size: 70px;
  max-width: 800px;
  line-height: 1;
  text-align: center;
  font-weight: bold;
  text-transform: capitalize;
  margin-.........完整代码请登录后点击上方下载按钮下载查看

网友评论0