vfxjs实现网页玻璃透明立体泡泡跟随鼠标变形动画代码

代码语言:html

所属分类:其他

代码描述:vfxjs实现网页玻璃透明立体泡泡跟随鼠标变形动画代码

代码标签: vfx js 网页 玻璃 透明 立体 泡泡 跟随 鼠标 变形 动画 代码

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

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

<head>
  <meta charset="UTF-8">
  
  
  
<style>
:root {
  --bg: #fbfbfd;
  --fg: #1d1d1f;
  --fg-dark: #f5f5f7;
  --muted: #6e6e73;
  --link: #0066cc;
  --border: 1px solid rgba(0, 0, 0, 0.08);
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "SF Pro Text", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

nav {
  position: relative;
  z-index: 10;
  background: rgba(251, 251, 253, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: var(--border);
}
nav ul {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin: 0;
  padding: 0 24px;
  list-style: none;
  height: 44px;
  align-items: center;
  font-size: 0.82rem;
}
nav a {
  color: inherit;
  text-decoration: none;
  opacity: 0.85;
}
nav a:hover {
  opacity: 1;
}

.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: black;
}
.hero img,
.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero img {
  background: black;
  opacity: 0.3;
}
.copy {
  text-align: center;
}
.hero .copy {
  position: absolute;
  top: 30%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  color: #fff;
}
.hero h1 {
  font-size: 4.2rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0 0 8px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.hero h2 {
  font-size: 1.7rem;
  font-weight: 400;
  margin:.........完整代码请登录后点击上方下载按钮下载查看

网友评论0