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: #f0f4f8;
overflow-x: hidden;
color: #1a202c;
}
#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: rgba(255,255,255,0.9);
backdrop-filter: blur(10px);
box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}
.logo {
font-size: 1.5em;
font-weight: bold;
color: #3182ce;
letter-spacing: 2px;
}
.nav-links {
display: flex;
gap: 30px;
}
.nav-links a {
color: #4a5568;
text-decoration: none;
font-size: 0.9em;
transition: all 0.3s;
cursor: pointer;
pointer-events: auto;
font-weight: 500;
}
.nav-links a:hover {
color: #3182ce;
}
/* 进度指示器 */
.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 #cbd5e0;
border-radius: 50%;
cursor: pointer;
transition: all 0.3s;
position: relative;
pointer-events: auto;
background: #fff;
}
.progress-dot::before {
content: attr(data-label);
position: absolute;
right: 25px;
top: 50%;
transform: translateY(-50%);
white-space: nowrap;
font-size: 0.8em;
color: #718096;
opacity: 0;
transition: all 0.3s;
pointer-events: none;
font-weight: 500;
}
.progress-dot:hover::before {
opacity: 1;
right: 30px;
}
.progress-dot:hover {
border-color: #3182ce;
}
.progress-dot.active {
background: #3182ce;
border-color: #3182ce;
box-shadow: 0 0 0 4px rgba(49,130,206,0.2);
}
/* 内容面板 */
.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;
background: rgba(255,255,255,0.95);
backdrop-filter: blur(10px);
padding: 30px;
border-radius: 16px;
box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}
.content-panel.visible {
opacity: 1;
pointer-events: auto;
}
.component-icon {
font-size: 2.5em;
margin-bottom: 15px;
}
.component-title {
font-size: 2em;
font-weight: bold;
margin-bottom: 8px;
color: #1a202c;
}
.component-subtitle {
font-size: 0.85em;
color: #3182ce;
margin-bottom: 20px;
letter-spacing: 2px;
text-transform: uppercase;
font-weight: 600;
}
.component-desc {
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0