media-feature
Height — CSS reference
The height range feature tests the output viewport height in continuous media or page box height in paged media. Avoid assuming that a wide viewport also has a tall viewport.
Formal Syntax & Structure
css syntaxcss
@media (height >= 700px) { /* conditional declarations */ }Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>height</title><style>body{margin:0}#a{padding:8px;background:rgb(232,237,241);color:rgb(0,0,0);box-sizing:border-box}@media (height >= 700px) {#a{color:rgb(0,100,0)}}</style><body><main id="a">Resize the viewport to explore this example.</main></body></html>