1 parent b54ae22 commit a4db321Copy full SHA for a4db321
1 file changed
test.html
@@ -179,16 +179,23 @@
179
height: 40px;
180
}
181
182
- /* 候選字區塊樣式 - 允許換行以避免溢出 */
+ /* 候選字區塊樣式 - 確保單行顯示並可水平捲動 */
183
.candidate-area {
184
- min-height: 60px; /* 調整為一致的高度 */
+ min-height: 60px;
185
display: flex;
186
- flex-wrap: wrap; /* 允許換行以避免溢出 */
+ flex-wrap: nowrap; /* 確保內容不換行 */
187
align-items: center;
188
padding: 8px;
189
gap: 8px;
190
- white-space: normal;
+ white-space: nowrap;
191
+ overflow-x: auto; /* 在內容溢出時啟用水平捲動 */
192
+ -ms-overflow-style: none; /* IE and Edge */
193
+ scrollbar-width: none; /* Firefox */
194
195
+ .candidate-area::-webkit-scrollbar {
196
+ display: none; /* 隱藏 Chrome, Safari 的捲軸 */
197
+ }
198
+
199
.candidate-area span {
200
cursor: pointer;
201
padding: 5px 8px;
0 commit comments