Skip to content

Commit

Permalink
Create styles.css
Browse files Browse the repository at this point in the history
  • Loading branch information
GuoShi28 authored Aug 29, 2024
1 parent 47cf480 commit 10ea935
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/* 默认样式 */
body {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
font-family: Arial, sans-serif;
line-height: 1.5;
}

h2 {
font-size: 2rem;
text-align: center;
}

p {
font-size: 1rem;
text-align: justify;
}

/* 图片居中对齐 */
.center {
display: flex;
justify-content: center;
align-items: center;
margin: 20px 0;
}

/* 针对大屏幕的适配 */
@media (min-width: 1400px) {
body {
max-width: 80%; /* 设置最大宽度为80% */
}

h2 {
font-size: 2.5rem; /* 增大字体 */
}

p {
font-size: 1.2rem; /* 增大段落文字 */
line-height: 1.6; /* 调整行高 */
}
}

0 comments on commit 10ea935

Please sign in to comment.