Skip to content

Commit e1e6092

Browse files
committed
fix: 調整關閉按鈕位置到內容區塊內並使用 sticky 定位
- 使用 position: sticky 讓按鈕在內容區塊內但滾動時固定 - 使用 float: right 讓按鈕靠右對齊 - 更新版本號至 v20250603002
1 parent 3e78771 commit e1e6092

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<meta http-equiv="Expires" content="0">
99
<meta name="theme-color" content="#000000">
1010
<title>GitHub Copilot 教學專案</title>
11-
<link rel="stylesheet" href="style.css?v=20250603001">
11+
<link rel="stylesheet" href="style.css?v=20250603002">
1212
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
1313
<script src="https://cdn.jsdelivr.net/npm/qrcodejs@1.0.0/qrcode.min.js"></script>
1414
</head>
@@ -344,14 +344,14 @@ <h3 style="font-size: 1.25rem; font-weight: 600; color: #1d1d1f; margin-bottom:
344344

345345
<!-- Markdown Modal -->
346346
<div id="markdownModal" class="markdown-modal">
347-
<button class="markdown-close" onclick="closeMarkdown()" aria-label="關閉"></button>
348347
<div class="markdown-content">
348+
<button class="markdown-close" onclick="closeMarkdown()" aria-label="關閉"></button>
349349
<div id="markdownBody">
350350
<div class="markdown-loading">載入中...</div>
351351
</div>
352352
</div>
353353
</div>
354354

355-
<script src="script.js?v=20250603001"></script>
355+
<script src="script.js?v=20250603002"></script>
356356
</body>
357357
</html>

style.css

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -660,9 +660,11 @@ body {
660660
}
661661

662662
.markdown-close {
663-
position: fixed;
664-
top: 70px;
665-
right: calc(5% + 20px);
663+
position: sticky;
664+
top: 20px;
665+
float: right;
666+
margin-left: 20px;
667+
margin-bottom: 20px;
666668
width: 36px;
667669
height: 36px;
668670
cursor: pointer;

0 commit comments

Comments
 (0)