three实现三维炫酷鼠标跟随发光骨折环代码
代码语言:html
所属分类:三维
代码描述:three实现三维炫酷鼠标跟随发光骨折环代码
代码标签: three 三维 炫酷 鼠标 跟随 发光 骨折 环 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
:root {
--orange: #ff4d00;
--orange2: #ff8c00;
--white: #eee8de;
--dim: rgba(238, 232, 222, 0.35);
--bg: #050505;
--mono: "Courier New", Courier, monospace;
}
html {
scroll-behavior: auto;
}
body {
background: var(--bg);
color: var(--white);
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
overflow-x: hidden;
cursor: none;
}
/* ── Custom cursor ─────────────────────────────────────────── */
#cursor {
position: fixed;
width: 10px;
height: 10px;
border-radius: 50%;
background: var(--orange);
pointer-events: none;
z-index: 9999;
transform: translate(-50%, -50%);
transition:
width 0.2s,
height 0.2s,
opacity 0.2s;
mix-blend-mode: screen;
}
#cursor-ring {
position: fixed;
width: 40px;
height: 40px;
border-radius: 50%;
border: 1px solid rgba(255, 77, 0, 0.5);
pointer-events: none;
z-index: 9998;
transform: translate(-50%, -50%);
transition:
transform 0.12s ease-out,
width 0.3s,
height 0.3s,
border-color 0.3s;
}
body:has(.webgl:hover) #cursor-ring {
width: 60px;
height: 60px;
border-color: var(--orange);
}
/* ── Fixed canvas ─────────────────────────────────────────── */
.webgl {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 0;
}
/* ── Nav ──────────────────────────────────────────────────── */
nav {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 100;
display: flex;
justify-content: space-between;
align-items: center;
padding: 1.8rem 3rem;
border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.nav-logo {
font-family: var(--mono);
font-size: 0.7rem;
letter-spacing: 0.3em;
color: var(--white);
opacity: 0.5;
}
.nav-status {
display: flex;
align-items: center;
gap: 0.6rem;
font-family: var(--mono);
font-size: 0.65rem;
letter-spacing: 0.15em;
color: var(--orange);
opacity: 0;
}
.nav-status .dot-live {
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--orange);
animation: blink 1.4s ease-in-out infinite;
}
@keyframes blink {
0%,
100% {
opacity: 1;
}
50% {
opacity: 0.2;
}
}
/* ── Progress sidebar ─────────────────────────────────────── */
.sidebar {
position: fixed;
left: 3rem;
top: 50%;
transform: translateY(-50%);
z-index: 100;
display: flex;
flex-direction: column;
gap: 1.5rem;
align-items: flex-start;
}
.sidebar-item {
display: flex;
align-items: center;
gap: 0.8rem;
cursor: pointer;
}
.sidebar-tick {
width: 20px;
height: 1px;
background: rgba(255, 255, 255, 0.15);
transition:
width 0.4s,
background 0.4s;
}
.sidebar-label {
font-family: var(--mono);
font-size: 0.58rem;
letter-spacing: 0.18em;
text-transform: uppercase;
color: rgba(255, 255, 255, 0.2);
transition: color 0.4s;
opacity: 0;
}
.sidebar-item.active .sidebar-label {
color: var(--orange);
}
.sidebar-item.active .sidebar-tick {
width: 32px;
background: var(--orange);
}
/* ── Corner HUD decorations ───────────────────────────────── */
.hud-corner {
position: fixed;
z-index: 100;
pointer-events: none;
opacity: 0;
}
.hud-corner svg {
display: block;
}
.hud-tl {
top: 5rem;
left: 3rem;
}
.hud-br {
bottom: 2.5rem;
right: 3rem;
}
.hud-readout {
font-family: var(--mono);
font-size: 0.6rem;
letter-spacing: 0.12em;
color: rgba(255, 255, 255, 0.2);
line-height: 1.8;
}
/* ── Scrollable content ───────────────────────────────────── */
.content {
position: relative;
z-index: 10;
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0