orientation —方向 portrait—竖 landscape— 横
@media screen and (orientation:portrait) {
body {
font-size: 14px;
background: yellow;
}
}
@media screen and (orientation: landscape) {
body {
font-size: 20px;
background: blue;
}
}
// 或者第二种写法
<link rel="stylesheet" href="./css/style1.css" media="all and (orientation:portrait)">
<link rel="stylesheet" href="./css/style2.css" media="all and (orientation:landscape)">
媒体类型