MediaQueries

MediaQueries

  • media query consists of an optional media type and zero or more expressions that limit the style sheets' scope by using media features, such as width, height, and color. Media queries, added in CSS3, let the presentation of content be tailored to a specific range of output devices without having to change the content itself.

  • Most media features can be prefixed with "min-" or "max-" to express "minimum condition" or "maximum condition" constraints. For example, "max-width:12450px" means the highest condition for applying the styles is, the media have a screen with 12450px width. If the screen is wider than 12450px, the style will not be applied. This avoids using the "<" and ">" symbols, which would conflict with HTML and XML. If you use a media feature without specifying a value, the expression resolves to true if the feature's value is non-zero.