W3cubDocs

/CSS

@media.orientation

orientation is a CSS media feature that can be used to check what the orientation of the viewport is.

Enumerated values

Value Meaning
portrait
landscape

Specifications

Specification Status Comment
Media Queries
The definition of 'orientation' in that specification.
Recommendation Initial definition.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support ? ? ? ? ?
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support ? ? ? ? ?

© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/@media/orientation