descriptor
@page/page orientation — CSS reference
Rotates a page after layout rather than changing its layout dimensions. upright preserves orientation; rotate-left and rotate-right request quarter-turn rotations. Prefer size with landscape when content needs a wider layout.
Formal Syntax & Structure
css syntaxcss
@page { size: 300px 400px; page-orientation: rotate-right; }Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>@page/page-orientation</title><style>body{margin:0}#a{padding:8px;background:rgb(232,237,241);color:rgb(0,0,0);box-sizing:border-box}p{margin:0;font:12px/16px sans-serif}.next{break-before:page}@page{size:300px 400px;margin:40px;page-orientation:rotate-right}</style><body><main><p>BODY</p></main></body></html>