media query max height code example
Example 1: media query min and max
@media only screen and (max-width: 600px) {...}
@media only screen and (min-width: 600px) {...}
@media only screen and (max-width: 600px) and (min-width: 400px) {...}
Example 2: min and max width media query
@media (max-width: 989px) and (min-width: 768px) {}
Example 3: hegith specific css in media query
@media (height: 360px) {
div {
color: red;
}
}
@media (min-height: 25rem) {
div {
background: yellow;
}
}
@media (max-height: 40rem) {
div {
border: 2px solid blue;
}
}
Example 4: media query
@media (max-height : 800px){
p{
font-size:10px
}
}
Example 5: what is a max and min width media query
@media only screen and (max-width: 600px) {...}
@media only screen and (min-width: 600px) {...}
Example 6: media query min and max width
@media screen and (max-width: 992px) {
body {
background-color: blue;
}
}