Are all desktop/laptop monitor's orientation s

2019-02-09 20:37发布

Are all desktop/laptop monitor's orientation similar to landscape orientation on devices like the iPad?

Is there any difference between?

body {background:red}

@media only screen and  (orientation : landscape) {
    body {background:blue}
}

1条回答
成全新的幸福
2楼-- · 2019-02-09 21:36

Are all Desktop/laptop Monitor's orientation similar to Landscape orientation on devices like iPad?

No they are not. The orientation is based on the width and height of the window.

Landscape Mode is when the window width is larger than window height.

Portrait Mode is when the window height is larger than window width.

You can see this using your example: http://jsfiddle.net/tw16/EaHhU/
Adjust the width of the results window to match the above scenarios and you will see the colour change.

Desktop Browser Support: Firefox 3.5+, Google Chrome 5+, Opera 10.6+, Safari 4+

Mobile Browser Support: Android 2+, iOS4, Mobile Firefox.

查看更多
登录 后发表回答