提交
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"topic_20260623-080258_0085f19f09f740ca": 1782201778258
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"topic_20260623-080258_0085f19f09f740ca": "auto"
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"topic_20260623-080258_0085f19f09f740ca": "这是一个自己简单写的天气项目,非常简…"
|
||||||
|
}
|
||||||
+25
-60
@@ -1,79 +1,44 @@
|
|||||||
|
*,
|
||||||
|
*::before,
|
||||||
|
*::after {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
color-scheme: light;
|
||||||
color-scheme: light dark;
|
|
||||||
color: rgba(255, 255, 255, 0.87);
|
|
||||||
background-color: #242424;
|
|
||||||
|
|
||||||
font-synthesis: none;
|
font-synthesis: none;
|
||||||
text-rendering: optimizeLegibility;
|
text-rendering: optimizeLegibility;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
|
||||||
font-weight: 500;
|
|
||||||
color: #646cff;
|
|
||||||
text-decoration: inherit;
|
|
||||||
}
|
|
||||||
a:hover {
|
|
||||||
color: #535bf2;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
display: flex;
|
|
||||||
place-items: center;
|
|
||||||
min-width: 320px;
|
min-width: 320px;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
background: #0f0c29; /* fallback for loading */
|
||||||
|
|
||||||
h1 {
|
|
||||||
font-size: 3.2em;
|
|
||||||
line-height: 1.1;
|
|
||||||
}
|
|
||||||
|
|
||||||
button {
|
|
||||||
border-radius: 8px;
|
|
||||||
border: 1px solid transparent;
|
|
||||||
padding: 0.6em 1.2em;
|
|
||||||
font-size: 1em;
|
|
||||||
font-weight: 500;
|
|
||||||
font-family: inherit;
|
|
||||||
background-color: #1a1a1a;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: border-color 0.25s;
|
|
||||||
}
|
|
||||||
button:hover {
|
|
||||||
border-color: #646cff;
|
|
||||||
}
|
|
||||||
button:focus,
|
|
||||||
button:focus-visible {
|
|
||||||
outline: 4px auto -webkit-focus-ring-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card {
|
|
||||||
padding: 2em;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#app {
|
#app {
|
||||||
max-width: 1280px;
|
width: 100%;
|
||||||
margin: 0 auto;
|
|
||||||
padding: 2rem;
|
|
||||||
text-align: center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (prefers-color-scheme: light) {
|
a {
|
||||||
:root {
|
color: inherit;
|
||||||
color: #213547;
|
text-decoration: none;
|
||||||
background-color: #ffffff;
|
}
|
||||||
}
|
|
||||||
a:hover {
|
/* 滚动条美化 */
|
||||||
color: #747bff;
|
::-webkit-scrollbar {
|
||||||
}
|
width: 6px;
|
||||||
button {
|
}
|
||||||
background-color: #f9f9f9;
|
::-webkit-scrollbar-track {
|
||||||
}
|
background: transparent;
|
||||||
|
}
|
||||||
|
::-webkit-scrollbar-thumb {
|
||||||
|
background: rgba(255,255,255,0.15);
|
||||||
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-8
@@ -1,13 +1,14 @@
|
|||||||
// rem 适配
|
// rem适配 — 移动端缩放,PC端固定基准
|
||||||
export const useREM = () => {
|
export const useREM = () => {
|
||||||
const baseSize = 75 // 基准大小,注意这里改为75
|
|
||||||
function setRem() {
|
function setRem() {
|
||||||
const scale = document.documentElement.clientWidth / 750 // 设计稿宽度改为750
|
const width = document.documentElement.clientWidth
|
||||||
document.documentElement.style.fontSize = baseSize * Math.min(scale, 2) + 'px'
|
// ≤768px 按375设计稿等比缩放,>768px 固定基准(不再放大)
|
||||||
|
if (width <= 768) {
|
||||||
|
document.documentElement.style.fontSize = (width / 375) * 37.5 + 'px'
|
||||||
|
} else {
|
||||||
|
document.documentElement.style.fontSize = '37.5px'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setRem() // 初始化
|
|
||||||
window.onresize = () => {
|
|
||||||
setRem()
|
setRem()
|
||||||
}
|
window.addEventListener('resize', setRem)
|
||||||
}
|
}
|
||||||
+798
-250
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user