media query based on height code example
Example 1: media query
@media only screen and (max-width: 600px) {
body {
background-color: lightblue;
}
}
Example 2: hegith specific css in media query
/* Exact height */
@media (height: 360px) {
div {
color: red;
}
}
/* Minimum height */
@media (min-height: 25rem) {
div {
background: yellow;
}
}
/* Maximum height */
@media (max-height: 40rem) {
div {
border: 2px solid blue;
}
}