mirror of
https://github.com/Kisechan/Mainpage.git
synced 2025-07-10 23:27:18 +00:00
添加深色模式切换功能,优化样式以支持深色主题
This commit is contained in:
@ -7,6 +7,9 @@
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
background-color: #242424;
|
||||
|
||||
--background-color: #242424;
|
||||
--text-color: #3d3d3d;
|
||||
|
||||
font-synthesis: none;
|
||||
text-rendering: optimizeLegibility;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
@ -18,10 +21,16 @@ a {
|
||||
color: #646cff;
|
||||
text-decoration: inherit;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #535bf2;
|
||||
}
|
||||
|
||||
.dark {
|
||||
--background-color: #242424;
|
||||
--text-color: rgb(228, 228, 228);
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
display: flex;
|
||||
@ -42,7 +51,8 @@ button {
|
||||
font-size: 1em;
|
||||
font-weight: 500;
|
||||
font-family: inherit;
|
||||
background-color: #1a1a1a;
|
||||
background-color: var(--background-color);
|
||||
color: var(--text-color);
|
||||
cursor: pointer;
|
||||
transition: border-color 0.25s;
|
||||
}
|
||||
@ -77,3 +87,7 @@ button:focus-visible {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
}
|
||||
|
||||
p,a,h1,h2,h3,h4,h5,h6 {
|
||||
color: var(--text-color);
|
||||
}
|
Reference in New Issue
Block a user