Orientation: Portrait / Landscape
除了直接指定瀏覽器寬度數值之外,也可以直接寫成瀏覽器寬度較寬或較窄(直式或橫式),寬度較寬時為landscape,寬度較窄時為portrait。
語法:
@media only screen and (orientation: landscape) {
body {
background-color: lightblue;
}
}
w3schools.com
CSS Media Queries – Examples