Skip to content

Commit dbe6b18

Browse files
committed
fix: 改善關閉按鈕定位邏輯
- 恢復 position: fixed 保持滾動體驗 - 使用 calc(50% - 450px + 20px) 精確對齊內容區域 - 新增 960px 斷點處理中等螢幕 - 確保按鈕在各種螢幕尺寸下都正確顯示
1 parent 675fb74 commit dbe6b18

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

index.html

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,9 @@
290290
}
291291

292292
.markdown-close {
293-
position: absolute;
294-
top: 20px;
295-
right: 20px;
293+
position: fixed;
294+
top: 70px;
295+
right: calc(50% - 450px + 20px);
296296
width: 30px;
297297
height: 30px;
298298
cursor: pointer;
@@ -342,6 +342,13 @@
342342
transform: scale(0.96);
343343
}
344344

345+
@media (max-width: 960px) {
346+
.markdown-close {
347+
right: 20px;
348+
top: 60px;
349+
}
350+
}
351+
345352
@media (max-width: 768px) {
346353
.markdown-close {
347354
right: 15px;

0 commit comments

Comments
 (0)