three实现三维互动玻璃鱼缸代码
代码语言:html
所属分类:三维
代码描述:three实现三维互动玻璃鱼缸代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Three.js 3D 互动玻璃鱼缸</title>
<style>
body { margin: 0; overflow: hidden; background-color: #1a1a1a; font-family: sans-serif; }
#canvas-container { width: 100vw; height: 100vh; }
/* 控制面板样式 */
#controls {
position: absolute;
bottom: 30px;
left: 50%;
transform: translateX(-50%);
display: flex;
gap: 20px;
z-index: 10;
}
.btn {
padding: 12px 24px;
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.3);
color: white;
border-radius: 30px;
cursor: pointer;
font-size: 16px;
backdrop-filter: blur(5px);
transition: all 0.3s;
outline: none;
}
.btn:hover {
background: rgba(255, 255, 255, 0.3);
box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}
.btn.active {
background: rgba(0, 255, 200, 0.6);
border-color: #00ffc8;
color: #00332a;
box-shadow: 0 0 20px rgba(0, 255, 200, 0.8);
}
#instruction {
position: absolute;
top: 2.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0