/* styles.css */ /* 左侧面板和右侧内容区域的基础样式 */ #sidebar { transition: all 0.3s ease; position: fixed; /* 改为fixed,使其在手机端浮动到图片显示区域之上 */ top: 0; left: 0; width: 25%; /* 初始宽度 */ height: 100vh; border-right: 1px solid #dee2e6; background-color: #f8f9fa; /* 调整背景色 */ z-index: 999; /* 保证浮动在右侧内容区域之上 */ overflow-x: hidden; /* 当内容超出高度时显示垂直滚动条 */ max-width: 400px; overflow-y: auto; /* 禁用垂直滚动条 */ } #contentArea { transition: all 0.3s ease; margin-left: 25%; /* 与左侧面板对应的初始偏移 */ padding: 20px; width: 75%; /* 与左侧面板对应的初始宽度 */ } /* 滚动条样式(仅对 Webkit 浏览器) */ #sidebar::-webkit-scrollbar { width: 5px; /* 滚动条宽度 */ } #sidebar::-webkit-scrollbar-thumb { background-color: #999; /* 滚动条滑块颜色 */ border-radius: 2px; } #sidebar::-webkit-scrollbar-track { background-color: #f1f1f1; /* 滚动条轨道颜色 */ } /* 左侧面板收缩状态 */ #sidebar.collapsed { width: 0; overflow: hidden; } #sidebar.collapsed .toggle-btn { left: 0; /* 收缩后按钮依然可见 */ } /* 内容区在面板收缩时占据整个屏幕 */ #contentArea.expanded { margin-left: 0; width: 100%; } /* 响应式设计:适配手机端 */ @media (max-width: 768px) { #sidebar { width: 80%; /* 在平板或手机端,展开宽度调整为80% */ height: 100%; } #contentArea { margin-left: 0; width: 100%; /* 内容区占用剩余空间 */ } /* 收缩状态下按钮保持可见 */ #sidebar.collapsed .toggle-btn { left: 0; } /* 为右侧20%的区域增加点击事件 */ #rightOverlay { position: fixed; top: 0; right: 0; width: 20%; height: 100%; z-index: 998; /* 在sidebar下,contentArea上 */ display: none; /* 初始隐藏 */ } /* 当sidebar展开时显示遮罩 */ #sidebar:not(.collapsed) + #rightOverlay { display: block; } } /* 伸缩按钮样式 */ .toggle-btn { position: absolute; top: 50%; left: 96%; transform: translateY(-50%); width: 18px; height: 66px; background-color: #999999; color: white; text-align: center; line-height: 66px; font-size: 12px; border-radius: 5px 0px 0px 5px; border: none; cursor: pointer; z-index: 1000; transition: all 0.3s ease; } /* 左侧面板收缩状态 */ #sidebar.collapsed .toggle-btn { left: 0; /* 收缩后按钮紧贴在左边 */ border-radius: 5px 0 0 5px; /* 收缩后的圆角调整 */ } /* 模型详情展示区样式 */ #modelDetails { background-color: #ffffff; border: 1px solid #dee2e6; padding: 15px; border-radius: 5px; } .model-card { cursor: pointer; } .card-img-top { height: 100%; transition: filter 0.3s ease-in-out; } .card-img-top.bg-blur { filter: blur(5px); } .model-icon { transition: opacity 0.3s ease-in-out; opacity: 0; } .model-icon.show { opacity: 1; } .card-title { z-index: 10; /* 确保文字在模糊背景的上方 */ } .model-icon { z-index: 20; /* 确保图标在最上层 */ } .btn-size-option { border: 1px solid #007bff; text-align: center; padding: 10px; border-radius: 5px; background-color: #fff; position: relative; } .btn-size-option img { max-width: 100%; height: auto; } .btn-check:checked + .btn-size-option { border-color: #007bff; background-color: #007bff; color: #fff; } /* 自定义滑块轨道样式 */ .form-range { -webkit-appearance: none; width: 100%; height: 8px; background: #ddd; /* 背景颜色 */ border-radius: 5px; outline: none; position: relative; } .form-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #007bff; /* 滑块颜色 */ cursor: pointer; } .form-range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #007bff; /* 滑块颜色 */ cursor: pointer; } .form-range::-ms-thumb { width: 20px; height: 20px; border-radius: 50%; background: #007bff; /* 滑块颜色 */ cursor: pointer; } .form-range::-webkit-slider-runnable-track { width: 100%; height: 8px; background: #ddd; /* 轨道背景颜色 */ border-radius: 5px; } .form-range::-moz-range-track { width: 100%; height: 8px; background: #ddd; /* 轨道背景颜色 */ border-radius: 5px; } .form-range::-ms-track { width: 100%; height: 8px; background: transparent; /* 必须透明,以便显示轨道背景 */ border-color: transparent; color: transparent; } /* 提示框样式 */ .form-control { resize: vertical; /* 允许垂直调整大小 */ } /* 提交按钮样式 */ .btn-submit { background-color: #007bff; /* 蓝色 */ color: #fff; border: none; border-radius: 5px; padding: 10px 20px; font-size: 16px; cursor: pointer; transition: background-color 0.3s ease; } .btn-submit:hover { background-color: #0056b3; /* 蓝色的较深色调 */ } .btn-submit:focus { outline: none; /* 去掉默认的焦点样式 */ } /* 确保 form-check-inline 的元素在同一行显示 */ .form-check-inline { display: inline-flex; /* 使用 inline-flex 使其成为内联块元素,并水平排列 */ align-items: center; /* 垂直居中对齐 */ margin-right: 10px; /* 添加右边距以分隔元素 */ } /* 调整 form-check-input 的位置 */ .form-check-input { margin-right: 5px; /* 输入框与标签之间的间距 */ } /* 选中模型卡片的样式 */ .model-card.selected { border: 2px solid #007bff; /* 选中时边框颜色 */ box-shadow: 0 0 10px rgba(0, 123, 255, 0.5); /* 选中时阴影效果 */ } .model-card.selected .model-icon { display: block; /* 显示选中的图标 */ } .card { border-radius: 10px; box-shadow: 0 1px 2px -2px rgba(0, 0, 0, .08), 0 3px 6px 0 rgba(0, 0, 0, .06), 0 5px 12px 4px rgba(0, 0, 0, .04); } .card-img-top { object-fit: cover; height: 260px; width: 100%; } .btn-custom { height: 22px; font-size: 12px; padding: 0 6px; border-radius: 10px; } .btn-success-custom { color: #fff; border-color: #18a058; } .btn-success-custom:hover { color: #36ad6a; border-color: #36ad6a; } .btn-primary-custom { color: #fff; border-color: #009BFF; } .btn-primary-custom:hover { color: #0078D5; border-color: #0078D5; } .btn-error-custom { color: #fff; border-color: #d03050; } .btn-error-custom:hover { color: #de576d; border-color: #de576d; } .badge { background-color: #b6e5ff; color: #004085; font-size: 0.75rem; padding: 0.4em; border-radius: 2rem; }