three实现三维北京四合院展示效果代码
代码语言:html
所属分类:三维
代码描述:three实现三维北京四合院展示效果代码,claude4.5生成
下面为部分代码预览,完整代码请点击下载或在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: 'Microsoft YaHei', Arial, sans-serif;
overflow: hidden;
background: #87ceeb;
}
#container {
width: 100vw;
height: 100vh;
position: relative;
}
#canvas {
display: block;
width: 100%;
height: 100%;
}
.control-panel {
position: absolute;
top: 20px;
left: 20px;
background: rgba(0, 0, 0, 0.85);
padding: 25px;
border-radius: 15px;
color: white;
min-width: 300px;
max-height: 90vh;
overflow-y: auto;
backdrop-filter: blur(10px);
border: 2px solid rgba(255, 255, 255, 0.1);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.control-panel::-webkit-scrollbar {
width: 8px;
}
.control-panel::-webkit-scrollbar-track {
background: rgba(255, 255, 255, 0.1);
border-radius: 4px;
}
.control-panel::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.3);
border-radius: 4px;
}
.panel-header {
text-align: center;
margin-bottom: 20px;
padding-bottom: 15px;
border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}
.panel-header h1 {
font-size: 22px;
margin-bottom: 5px;
color: #d4af37;
}
.panel-header p {
font-size: 12px;
color: #aaa;
}
.control-group {
margin-bottom: 20px;
}
.control-group label {
display: block;
margin-bottom: 10px;
font-size: 14px;
color: #ccc;
font-weight: bold;
}
.view-buttons {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 8px;
}
.btn {
padding: 12px;
border: 2px solid rgba(255, 255, 255, 0.2);
background: rgba(255, 255, 255, 0.1);
color: white;
border-radius: 8px;
cursor: pointer;
transition: all 0.3s;
font-size: 13px;
display: flex;
align-items: center;
justify-content: center;
gap: 5px;
}
.btn:hover {
background: rgba(255, 255, 255, 0.2);
transform: translateY(-2px);
}
.btn.active {
background: linear-gradient(135deg, #d4af37 0%, #aa8c2c 100%);
border-color: #d4af37;
box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}
.toggle-switch {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px;
background: rgba(255, 255, 255, 0.1);
border-radius: 8px;
margin-bottom: 10px;
}
.toggle-switch label {
margin: 0;
font-size: 14px;
}
.switch {
position: relative;
width: 50px;
height: 26px;
}
.switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #555;
transition: .4s;
border-radius: 34px;.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0