Media queries allow one to apply CSS rules based on the type of device / media (e.g. screen, print or handheld) called media type, additional aspects of the device are described with media features such as the availability of color or viewport dimensions.
@media [...] {
/* One or more CSS rules to apply when the query is satisfied */
}
@media print {
/* One or more CSS rules to apply when the query is satisfied */
}
@media screen and (max-width: 600px) {
/* One or more CSS rules to apply when the query is satisfied */
}
@media (orientation: portrait) {
/* One or more CSS rules to apply when the query is satisfied */
}