three实现鼠标滚动驱动三维主板丝滑切换介绍动画效果代码
代码语言:html
所属分类:三维
代码描述:three实现鼠标滚动驱动三维主板丝滑切换介绍动画效果代码
代码标签: three 鼠标 滚动 驱动 三维 主板 丝滑 切换 介绍 动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>主板硬件探索 - 3D互动体验</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
background: #0a0a0f;
overflow-x: hidden;
color: #fff;
}
#canvas-container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100vh;
z-index: 1;
}
.scroll-container {
height: 700vh;
position: relative;
z-index: 2;
pointer-events: none;
}
/* 顶部导航 */
.top-nav {
position: fixed;
top: 0;
left: 0;
right: 0;
padding: 20px 40px;
display: flex;
justify-content: space-between;
align-items: center;
z-index: 100;
background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
}
.logo {
font-size: 1.5em;
font-weight: bold;
color: #00ffff;
text-shadow: 0 0 10px #00ffff;
letter-spacing: 2px;
}
.nav-links {
display: flex;
gap: 30px;
}
.nav-links a {
color: rgba(255,255,255,0.7);
text-decoration: none;
font-size: 0.9em;
transition: all 0.3s;
cursor: pointer;
pointer-events: auto;
}
.nav-links a:hover {
color: #00ffff;
text-shadow: 0 0 10px #00ffff;
}
/* 进度指示器 */
.progress-indicator {
position: fixed;
right: 30px;
top: 50%;
transform: translateY(-50%);
z-index: 100;
display: flex;
flex-direction: column;
gap: 15px;
}
.progress-dot {
width: 12px;
height: 12px;
border: 2px solid rgba(0,255,255,0.5);
border-radius: 50%;
cursor: pointer;
transition: all 0.3s;
position: relative;
pointer-events: auto;
}
.progress-dot::before {
content: attr(data-label);
position: absolute;
right: 25px;
top: 50%;
transform: translateY(-50%);
white-space: nowrap;
font-size: 0.8em;
color: rgba(255,255,255,0.5);
opacity: 0;
transition: all 0.3s;
pointer-events: none;
}
.progress-dot:hover::before {
opacity: 1;
right: 30px;
}
.progress-dot:hover {
border-color: #00ffff;
box-shadow: 0 0 15px #00ffff;
}
.progress-dot.active {
background: #00ffff;
border-color: #00ffff;
box-shadow: 0 0 20px #00ffff;
}
/* 内容面板 */
.content-panel {
position: fixed;
left: 40px;
top: 50%;
transform: translateY(-50%);
max-width: 400px;
z-index: 100;
opacity: 0;
transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
pointer-events: none;
}
.content-panel.visible {
opacity: 1;
pointer-events: auto;
}
.component-icon {
font-size: 3em;
margin-bottom: 15px;
filter: drop-shadow(0 0 20px currentColor);
}
.component-title {
font-size: 2.5em;
font-weight: bold;
margin-bottom: 10px;
background: linear-gradient(135deg, #00ffff, #ff00ff);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.component-subtitle {
font-size: 1.1em;
color: #00ffff;
margin-bottom: 20px;
letter-spacing: 3px;
text-transform: uppercase;
}
.component-desc {
font-size: 1em;
line-height: 1.8;
color: rgba(255,255,255,0.8);
margin-bottom: 25px;
}
.component-specs {
display: grid;
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0