animejs实现炫酷矩阵螺旋动画效果代码

代码语言:html

所属分类:动画

代码描述:animejs实现炫酷矩阵螺旋动画效果代码

代码标签: anime 炫酷 矩阵 螺旋 动画

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

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

<head>
  <meta charset="UTF-8">
  
  
  
  
<style>
body {
  background: #101510;
  margin: 0;
  min-height: 200vh;
  font-family: 'Share Tech Mono', 'Fira Mono', 'Consolas', monospace;
}

.container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.hud-stack {
  position: relative;
  width: 400px;
  height: 400px;
  display: block;
}

#matrix-bg, #hud-svg {
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100%;
  display: block;
	border-radius: 50%;
}

.controls {
  z-index: 2;
  margin-bottom: 18px;
}

#randomize-btn {
  padding: 8px 20px;
  font-size: 1.1rem;
  background: #101510;
  color: #39ff14;
  border: 2px solid #39ff14;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
#randomize-btn:hover {
  background: #39ff14;
  color: #101510;
}

#hud-svg {
  display: block;
  position: relative;
  z-index: 1;
  width: 400px;
  height: 400px;
}

.spiral-path {
  stroke: url(#spiral-gradient);
  fill: none;
  filter: drop-shadow(0 0 10px #39ff14) drop-shadow(0 0 24px #39ff14);
  opacity: 0.97;
  transition: stroke-width 0.3s;
}

.hud-ring {
  stroke: #183218;
  stroke-width: 8;
  fill: none;
  opacity: 0.38;
}

.hud-arc {
  stroke-width: 7;
  fill: none;
  opacity: 0.8;
  filter: drop-shadow(0 0 10px #39ff14);
}

.hud-tick {
  stroke: #39ff14;
  stroke-width: 2;
  opacity: 0.22;
}

.energy-core {
  fill: url(#core-gradient);
  filter: drop-shadow(0 0 30px #39ff14);
  opacity: 0.97;
}
</style>

  
</head>

<body translate="no">
  <div class="container">
  <div class="controls">
    <button id="randomize-btn">Randomize Spiral</button>
  </div>
  &l.........完整代码请登录后点击上方下载按钮下载查看

网友评论0