97 lines
1.5 KiB
CSS
97 lines
1.5 KiB
CSS
/* 默认字体大小(桌面端) */
|
|
|
|
h1 {
|
|
font-size: 24px;
|
|
}
|
|
|
|
h2 {
|
|
font-size: 20px;
|
|
}
|
|
|
|
h3 {
|
|
font-size: 16px;
|
|
}
|
|
|
|
h4 {
|
|
font-size: 14px;
|
|
}
|
|
|
|
/* * 手机端-手机端-手机端-手机端-手机端-手机端-手机端-手机端-手机端 * */
|
|
|
|
/* 手机端 */
|
|
@media (max-width: 767px) {
|
|
body {
|
|
font-size: 12px;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 18px;
|
|
}
|
|
|
|
h2 {
|
|
font-size: 16px;
|
|
}
|
|
|
|
h3 {
|
|
font-size: 14px;
|
|
}
|
|
|
|
h4 {
|
|
font-size: 12px;
|
|
}
|
|
}
|
|
|
|
/* 手机端(竖屏) */
|
|
@media (max-width: 767px) and (orientation: portrait) {
|
|
.container {
|
|
background-color: lightblue;
|
|
}
|
|
}
|
|
|
|
/* 手机端(横屏) */
|
|
@media (max-width: 767px) and (orientation: landscape) {
|
|
.container {
|
|
background-color: lightcyan;
|
|
}
|
|
}
|
|
|
|
|
|
/* * 平板端-平板端-平板端-平板端-平板端-平板端-平板端-平板端-平板端 * */
|
|
|
|
/* 平板端 */
|
|
@media (min-width: 768px) and (max-width: 1024px) {
|
|
body {
|
|
font-size: 14px;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 20px;
|
|
}
|
|
|
|
h2 {
|
|
font-size: 18px;
|
|
}
|
|
|
|
h3 {
|
|
font-size: 16px;
|
|
}
|
|
|
|
h4 {
|
|
font-size: 14px;
|
|
}
|
|
}
|
|
|
|
/* 平板端(竖屏) */
|
|
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
|
|
.container {
|
|
background-color: lightgreen;
|
|
}
|
|
}
|
|
|
|
/* 平板端(横屏) */
|
|
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
|
|
.container {
|
|
background-color: lightgoldenrodyellow;
|
|
}
|
|
}
|