Skip to content

Commit 066623a

Browse files
committed
Update
1 parent 3b67ced commit 066623a

3 files changed

Lines changed: 57 additions & 36 deletions

File tree

404.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,9 @@
1414
<title>404 - 红蓝灯的个人网站</title>
1515
<script>
1616
function random_err() {
17-
let cn_errs = ["404 找不到页面", "404 你的页面去玩蛋仔派对了,我找不到他", "404 你的页面去玩MC了,我找不到他"]
18-
let en_errs = ["404 No Page Found", "404 Your Page Went To The Eggy Party, I Can't Find Him", "404 Your Page Went To The Minecraft, I Can't Find Him"]
17+
let cn_errs = ["找不到页面", "你的页面去玩蛋仔派对了,我找不到他", "你的页面去玩MC了,我找不到他"]
18+
let en_errs = ["No Page Found", "Your Page Went To The Eggy Party, I Can't Find Him", "Your Page Went To The Minecraft, I Can't Find Him"]
1919
let random_index = Math.floor(Math.random() * cn_errs.length);
20-
let random_word_cn = cn_errs[random_index];
21-
let random_word_en = en_errs[random_index];
2220
document.getElementById("cn_err").innerHTML = cn_errs[random_index];
2321
document.getElementById("en_err").innerHTML = en_errs[random_index];
2422
}
@@ -55,13 +53,15 @@
5553
color: #999999;
5654
}
5755
</style>
56+
<link href="include/css/index.css" rel="stylesheet">
5857
</head>
5958
<body>
60-
<div id="main" style="margin-left: 15%;margin-right: 15%;padding: 1% 2% 2%;border-radius: 25px;background: rgba(0, 0, 0, 0.5);backdrop-filter: blur(5px);">
59+
<div id="main">
60+
<h1 class="english" style="text-align: center;">4 0 4</h1>
6161
<p class="chinese" id="cn_err">404 找不到页面</p>
6262
<p class="english" id="en_err">404 No Page Found</p>
6363
</div>
64-
<div id="copyright" style="margin-left: 15%;margin-right: 15%;margin-top: 2.5%;padding: 1% 2% 2.5%;border-radius: 25px;background: rgba(0, 0, 0, 0.5);backdrop-filter: blur(5px);">
64+
<div id="copyright">
6565
<p class="chinese" style="text-align: center;">© 2026 红蓝灯 保留所有权利</p>
6666
<p class="english" style="text-align: center;">© 2026 RBL All Rights Reserved</p>
6767
</div>

include/css/index.css

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -32,50 +32,55 @@ body.line-numbers {
3232
min-height: 100vh;
3333
}
3434

35-
/* 主体和版权块共享的“毛玻璃”样式 */
35+
/* 主体和版权块共享的“毛玻璃”样式(水平居中) */
3636
#main,
3737
#copyright {
38-
display: table-cell;
38+
/* 使用固定左右留白以确保两侧间距一致且不超过视口 */
39+
display: block;
3940
position: absolute;
40-
width: var(--page-width);
41-
margin-left: var(--page-margin);
42-
margin-right: var(--page-margin);
41+
left: var(--page-margin);
42+
right: var(--page-margin);
4343
padding: var(--card-padding);
4444
border-radius: var(--card-radius);
4545
background: var(--card-bg);
4646
backdrop-filter: var(--backdrop);
47+
box-sizing: border-box;
4748
}
4849

4950
/* main 特有 */
5051
#main {
5152
top: 0;
52-
overflow-y: auto;
53-
overflow-x: hidden;
54-
/* 保留滚动条空间以避免布局跳动 */
55-
scrollbar-gutter: stable both-edges;
56-
/* 始终显示(当无内容时会显示空的滚动条轨道) */
57-
height: auto !important;
58-
-webkit-overflow-scrolling: touch;
59-
padding-bottom: var(--gap-between);
53+
overflow-y: auto;
54+
overflow-x: hidden;
55+
/* 保留滚动条空间以避免布局跳动 */
56+
scrollbar-gutter: stable both-edges;
57+
/* 平滑滚动(移动设备) */
58+
-webkit-overflow-scrolling: touch;
59+
padding-bottom: var(--gap-between);
6060
max-height: 75%;
61+
box-sizing: border-box;
62+
}
63+
64+
/* 移除基于内边距的居中实现,使用显式宽度 + 左右留白 */
6165

62-
/* 自定义滚动条(WebKit / Blink) */
63-
#main::-webkit-scrollbar {
64-
width: 12px;
65-
}
66-
#main::-webkit-scrollbar-track {
67-
background: rgba(255,255,255,0.03);
68-
border-radius: 6px;
69-
}
70-
#main::-webkit-scrollbar-thumb {
71-
background: rgba(255,255,255,0.12);
72-
border-radius: 6px;
73-
}
74-
/* Firefox */
75-
#main {
76-
scrollbar-width: thin;
77-
scrollbar-color: rgba(255,255,255,0.12) rgba(255,255,255,0.03);
78-
}
66+
/* 自定义滚动条(WebKit / Blink)——更细的样式 */
67+
#main::-webkit-scrollbar {
68+
width: 8px;
69+
height: 8px;
70+
}
71+
#main::-webkit-scrollbar-track {
72+
background: rgba(255,255,255,0.02);
73+
border-radius: 4px;
74+
}
75+
#main::-webkit-scrollbar-thumb {
76+
background: rgba(255,255,255,0.10);
77+
border-radius: 4px;
78+
}
79+
80+
/* Firefox */
81+
#main {
82+
scrollbar-width: thin;
83+
scrollbar-color: rgba(255,255,255,0.10) rgba(255,255,255,0.02);
7984
}
8085

8186
/* copyright 特有 */

index.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,22 @@
4848
}</code></pre>
4949

5050
<br/>
51+
1
52+
2
53+
3
54+
4
55+
5
56+
6
57+
7
58+
8
59+
9
60+
10
61+
11
62+
12
63+
13
64+
14
65+
15
66+
16
5167
</div>
5268
<br/>
5369
<div id="copyright">

0 commit comments

Comments
 (0)