冯杨

基础提交

@@ -45,11 +45,12 @@ @@ -45,11 +45,12 @@
45 45
46 /* 切换按钮样式 */ 46 /* 切换按钮样式 */
47 #sidebar-toggle { 47 #sidebar-toggle {
48 - position: absolute;  
49 - bottom: 15px;  
50 - left: -18px;  
51 - width: 36px;  
52 - height: 36px; 48 + position: fixed;
  49 + top: 50%;
  50 + left: -24px;
  51 + transform: translateY(-50%);
  52 + width: 48px;
  53 + height: 48px;
53 background-color: #4285f4; 54 background-color: #4285f4;
54 color: white; 55 color: white;
55 border: none; 56 border: none;
@@ -59,19 +60,18 @@ @@ -59,19 +60,18 @@
59 justify-content: center; 60 justify-content: center;
60 cursor: pointer; 61 cursor: pointer;
61 z-index: 100; 62 z-index: 100;
62 - font-size: 16px; 63 + font-size: 20px;
63 box-shadow: 0 3px 8px rgba(0,0,0,0.2); 64 box-shadow: 0 3px 8px rgba(0,0,0,0.2);
64 transition: all 0.3s ease; 65 transition: all 0.3s ease;
65 } 66 }
66 67
67 - #sidebar-toggle:hover {  
68 - background-color: #3367d6;  
69 - transform: scale(1.05); 68 + #sidebar-toggle {
  69 + left: 0;
70 } 70 }
71 71
72 /* 收缩状态下的切换按钮位置调整 */ 72 /* 收缩状态下的切换按钮位置调整 */
73 #sidebar.collapsed #sidebar-toggle { 73 #sidebar.collapsed #sidebar-toggle {
74 - left: -18px; 74 + left: 0;
75 background-color: #4285f4; 75 background-color: #4285f4;
76 } 76 }
77 77
@@ -91,77 +91,8 @@ @@ -91,77 +91,8 @@
91 min-height: 100vh; /* 确保至少有足够的高度 */ 91 min-height: 100vh; /* 确保至少有足够的高度 */
92 } 92 }
93 93
94 - /* 悬浮展开按钮样式 */  
95 - #expand-sidebar {  
96 - position: fixed;  
97 - bottom: 15px;  
98 - left: 15px;  
99 - width: 36px;  
100 - height: 36px;  
101 - background-color: #4285f4;  
102 - color: white;  
103 - border: none;  
104 - border-radius: 50%;  
105 - display: none;  
106 - align-items: center;  
107 - justify-content: center;  
108 - cursor: pointer;  
109 - z-index: 40;  
110 - font-size: 16px;  
111 - box-shadow: 0 3px 8px rgba(0,0,0,0.2);  
112 - transition: all 0.3s ease;  
113 - }  
114 -  
115 - #expand-sidebar:hover {  
116 - background-color: #3367d6;  
117 - transform: scale(1.05);  
118 - }  
119 -  
120 - /* 侧边栏收缩时显示展开按钮 */  
121 - #sidebar.collapsed ~ #main-content #expand-sidebar {  
122 - display: flex;  
123 - }  
124 -  
125 - /* 确保侧边栏收缩时视频容器仍然可见 */  
126 - #sidebar.collapsed ~ #main-content #media {  
127 - display: block !important;  
128 - width: auto;  
129 - height: auto;  
130 - max-height: 90vh;  
131 - max-width: 90vw;  
132 - aspect-ratio: 9/16; /* 保持竖屏比例 */  
133 - z-index: 1000;  
134 - visibility: visible !important;  
135 - position: relative;  
136 - opacity: 1 !important;  
137 - }  
138 -  
139 - /* 侧边栏收缩时主内容区域的调整 */  
140 - #sidebar.collapsed + #main-content {  
141 - margin-left: 0;  
142 - display: flex;  
143 - justify-content: center; /* 水平居中 */  
144 - align-items: center; /* 垂直居中 */  
145 - padding: 20px; /* 添加内边距 */  
146 - width: 100%; /* 确保占满整个宽度 */  
147 - height: 100vh; /* 确保占满整个高度 */  
148 - overflow: visible; /* 防止内容被裁剪 */  
149 - } 94 +
150 95
151 - /* 侧边栏收缩时媒体容器的调整 */  
152 - #sidebar.collapsed + #main-content #media,  
153 - #sidebar.collapsed ~ #main-content #media {  
154 - width: auto;  
155 - height: auto;  
156 - max-height: 90vh;  
157 - max-width: 90vw;  
158 - aspect-ratio: 9/16; /* 保持竖屏比例 */  
159 - display: block !important; /* 确保显示 */  
160 - z-index: 1000; /* 进一步提高z-index确保在最上层 */  
161 - position: relative;  
162 - visibility: visible !important;  
163 - opacity: 1 !important;  
164 - }  
165 96
166 /* 按钮样式 */ 97 /* 按钮样式 */
167 button { 98 button {
@@ -313,7 +244,6 @@ @@ -313,7 +244,6 @@
313 244
314 <!-- 主内容区域 --> 245 <!-- 主内容区域 -->
315 <div id="main-content"> 246 <div id="main-content">
316 - <button id="expand-sidebar"></button>  
317 <div id="media"> 247 <div id="media">
318 <h2>艺云展陈</h2> 248 <h2>艺云展陈</h2>
319 <audio id="audio" autoplay="true"></audio> 249 <audio id="audio" autoplay="true"></audio>