The orientation
CSS descriptor controls the orientation of a document defined by @viewport
.
/* Keyword values */ orientation: auto; orientation: portrait; orientation: landscape;
For a UA/device where the orientation is changed upon tilting the device, an author can use this descriptor to inhibit the orientation change.
auto
portrait
landscape
Related at-rule | @viewport |
---|---|
Initial value | auto |
Percentages | refer to the size of bounding box |
Computed value | as specified |
auto | portrait | landscape
@viewport { orientation: landscape; }
Specification | Status | Comment |
---|---|---|
CSS Device Adaptation The definition of '"orientation" descriptor' in that specification. | Working Draft | Initial definition |
Desktop | ||||||
---|---|---|---|---|---|---|
orientation descriptor |
No | 12 — 79
|
No | 10
|
No | No |
Mobile | ||||||
---|---|---|---|---|---|---|
orientation descriptor |
No | No | No | 11.1 — 14
|
No | No |
© 2005–2020 Mozilla and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/@viewport/orientation