File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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=20250603003 ">
11+ < link rel ="stylesheet " href ="style.css?v=20250603005 ">
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 >
@@ -352,6 +352,6 @@ <h3 style="font-size: 1.25rem; font-weight: 600; color: #1d1d1f; margin-bottom:
352352 </ div >
353353 </ div >
354354
355- < script src ="script.js?v=20250603003 "> </ script >
355+ < script src ="script.js?v=20250603005 "> </ script >
356356</ body >
357357</ html >
Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ function addCopyButtons() {
195195
196196 // 創建按鈕容器
197197 const buttonContainer = document . createElement ( 'div' ) ;
198- buttonContainer . style . cssText = 'position: absolute ; top: 5px; right: 5px; display: flex; gap: 5px; align-items: center;' ;
198+ buttonContainer . style . cssText = 'position: sticky ; top: 10px; float: right; margin-right: - 5px; margin-top: -35px; display: flex; gap: 5px; align-items: center; z-index: 10 ;' ;
199199
200200 // 如果有語言標示,添加語言標籤
201201 if ( language ) {
@@ -265,8 +265,8 @@ function addCopyButtons() {
265265 // 添加按鈕到容器
266266 buttonContainer . appendChild ( button ) ;
267267
268- // 添加容器到程式碼區塊
269- block . appendChild ( buttonContainer ) ;
268+ // 將容器插入到程式碼區塊的開頭
269+ block . insertBefore ( buttonContainer , block . firstChild ) ;
270270 } ) ;
271271}
272272
Original file line number Diff line number Diff line change @@ -661,12 +661,12 @@ body {
661661
662662.markdown-close {
663663 position : sticky;
664- top : 10 px ;
664+ top : 15 px ;
665665 float : right;
666666 margin-left : 20px ;
667667 margin-bottom : 20px ;
668- margin-top : -10 px ;
669- margin-right : -10 px ;
668+ margin-top : -20 px ;
669+ margin-right : -20 px ;
670670 width : 36px ;
671671 height : 36px ;
672672 cursor : pointer;
@@ -720,9 +720,9 @@ body {
720720
721721@media (max-width : 768px ) {
722722 .markdown-close {
723- top : 5 px ;
724- margin-right : -5 px ;
725- margin-top : -5 px ;
723+ top : 10 px ;
724+ margin-right : -10 px ;
725+ margin-top : -10 px ;
726726 width : 32px ;
727727 height : 32px ;
728728 border-radius : 16px ;
@@ -774,7 +774,8 @@ body {
774774 background : rgba (142 , 142 , 147 , 0.08 );
775775 border : none;
776776 border-radius : 12px ;
777- padding : 20px ;
777+ padding : 15px ;
778+ padding-top : 45px ;
778779 overflow-x : auto;
779780 margin : 20px 0 ;
780781 position : relative;
@@ -803,17 +804,10 @@ body {
803804
804805.markdown-content pre .copy-button ,
805806.markdown-content pre .lang-label {
806- opacity : 0 ;
807+ opacity : 1 ;
807808 transition : opacity 0.3s ;
808- position : absolute;
809- top : 20px ;
810- right : 20px ;
811809}
812810
813- .markdown-content pre : hover .copy-button ,
814- .markdown-content pre : hover .lang-label {
815- opacity : 1 ;
816- }
817811
818812.copy-button : hover {
819813 background : # 0077ed ;
You can’t perform that action at this time.
0 commit comments