Orientation Query

Apply styles depending on screen orientation.

Preview

Code

<style>
.box{
background:#2563eb;
color:white;
padding:20px;
}

@media (orientation:landscape){
.box{
background:#22c55e;
}
}
</style>

<div class="box">Rotate device</div>

More CSS Media Queries Examples (8)