Files
weather-api/public/style.css
EdgeOne Pages d22628f972 feat: init
2025-12-31 17:08:26 +08:00

245 lines
3.7 KiB
CSS

body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto',
sans-serif;
line-height: 1.6;
color: #333;
max-width: 900px;
margin: 0 auto;
padding: 20px;
background-color: #f8fafc;
}
.container {
background: white;
padding: 40px;
border-radius: 12px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
border: 1px solid #e2e8f0;
}
h1 {
color: #1a202c;
border-bottom: 3px solid #3182ce;
padding-bottom: 15px;
margin-bottom: 30px;
font-size: 2.5rem;
font-weight: 700;
}
h2 {
color: #2d3748;
margin-top: 40px;
margin-bottom: 20px;
font-size: 1.8rem;
font-weight: 600;
border-bottom: 2px solid #e2e8f0;
padding-bottom: 8px;
}
h3 {
color: #4a5568;
margin-top: 30px;
margin-bottom: 15px;
font-size: 1.4rem;
font-weight: 600;
}
h4 {
color: #718096;
margin-top: 25px;
margin-bottom: 12px;
font-size: 1.2rem;
font-weight: 600;
}
a {
color: #3182ce;
text-decoration: none;
border-bottom: 1px solid transparent;
transition: all 0.2s ease;
}
a:hover {
color: #2c5282;
border-bottom-color: #3182ce;
}
ul, ol {
padding-left: 24px;
margin-bottom: 16px;
}
li {
margin-bottom: 8px;
line-height: 1.6;
}
p {
margin-bottom: 16px;
line-height: 1.7;
}
/* 表格样式 */
table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
background: white;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
th {
background: #4a5568;
color: white;
padding: 12px 16px;
text-align: left;
font-weight: 600;
font-size: 0.9rem;
text-transform: uppercase;
letter-spacing: 0.5px;
}
td {
padding: 12px 16px;
border-bottom: 1px solid #e2e8f0;
vertical-align: top;
}
tr:hover {
background-color: #f7fafc;
}
tr:last-child td {
border-bottom: none;
}
code {
background: #f1f5f9;
color: #e53e3e;
padding: 3px 6px;
border-radius: 4px;
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
font-size: 0.9em;
font-weight: 500;
}
pre {
background: #1a202c;
color: #e2e8f0;
padding: 20px;
border-radius: 8px;
overflow-x: auto;
margin: 20px 0;
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
font-size: 0.9rem;
line-height: 1.5;
border: 1px solid #2d3748;
}
pre code {
background: none;
color: inherit;
padding: 0;
border-radius: 0;
font-size: inherit;
}
.hljs {
background: #1a202c !important;
color: #e2e8f0 !important;
}
.highlight-box {
background: linear-gradient(135deg, #e6fffa 0%, #f0fff4 100%);
border-left: 4px solid #38a169;
padding: 24px;
margin: 30px 0;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(56, 161, 105, 0.1);
}
.highlight-box h3 {
color: #2f855a;
margin-top: 0;
margin-bottom: 12px;
}
.highlight-box p {
color: #2d3748;
margin-bottom: 8px;
}
.highlight-box p:last-child {
margin-bottom: 0;
}
img {
max-width: 100%;
height: auto;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
blockquote {
border-left: 4px solid #cbd5e0;
padding-left: 20px;
margin: 20px 0;
font-style: italic;
color: #4a5568;
background: #f7fafc;
padding: 16px 20px;
border-radius: 0 8px 8px 0;
}
@media (max-width: 768px) {
body {
padding: 10px;
}
.container {
padding: 20px;
}
h1 {
font-size: 2rem;
}
h2 {
font-size: 1.5rem;
}
table {
font-size: 0.9rem;
}
th, td {
padding: 8px 12px;
}
pre {
padding: 15px;
font-size: 0.8rem;
}
}
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 4px;
}
::-webkit-scrollbar-thumb {
background: #cbd5e0;
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: #a0aec0;
}