马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
先上以层结构图 (8层 10列,每列3个抽屉):
鼠标滑动结果:
以层结构 代码:
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>3D 货架</title>
- <link href="//unpkg.com/[email protected]/dist/css/layui.css" rel="stylesheet">
- <!--<link href="layui/css/layui.css" rel="stylesheet"> 如果本地有就引入本地的-->
- <style>
- body, html {
-
-
- width: 100%; /* 确保 body 宽度为 100% */
- height: 100%;
- margin: 0;
- display: flex;
- justify-content: center;
- align-items: center;
- background-color: #f0f0f0;
- }
- .shelf-container {
-
-
- width: 70%; /* 屏幕宽度的 70% */
- height: 50%;
- display: flex;
- flex-direction: column; /* 垂直排列 */
- justify-content: space-between; /* 每层之间均匀分布 */
- align-items: center;
- position: relative;
- border: 6px solid #8B4513; /* 木制颜色边框 */
- border-top: 10px solid #8B4513; /* 上边框加厚 */
- border-bottom: 10px solid #8B4513; /* 下边框加厚 */
- box-sizing: border-box;
- background: linear-gradient(to bottom, #ccb89c, #938066); /* 渐变色 */
- box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* 添加阴影 */
- transform-origin: center;
- }
- .column-labels {
-
-
- width: 100%;
- display: flex;</
复制代码 |