canvas发光泡泡上升动画背景效果代码

代码语言:html

所属分类:背景

代码描述:canvas发光泡泡上升动画背景效果代码

代码标签: canvas 发光 泡泡 上升 动画 背景

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

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

<head>
  <meta charset="UTF-8">

  
<style>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  height: 100vh;
  background: #001219;
  overflow: hidden;
}

.circle {
  position: absolute;
  bottom: 0;
  width: 20px;
  aspect-ratio: 1/1;
  background: #fca311;
  box-shadow: 0 0 10px #ff5400, 0 0 20px #ff5400, 0 0 30px #ff5400,
    0 0 50px #ff5400;
  border-radius: 50%;
  animation: animate 5s linear forwards;
}

@keyframes animate {
  0% {
    transform: translatey(0);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translatey(-100vh);
    opacity: 1;
  }
}

.circle::before {
  content: "";
  position: absolute;
  botto.........完整代码请登录后点击上方下载按钮下载查看

网友评论0