Skip to content

Latest commit

 

History

History
8 lines (6 loc) · 639 Bytes

File metadata and controls

8 lines (6 loc) · 639 Bytes

Why are media queries used in CSS?

Media queries are used in CSS to create responsive web designs. This means that the way a web page appears varies from one system to another based on the screen or the media type. The media query can be used to apply different styles or change the appearance (and even the behaviour) of a site or an app depending on a user's device type or specific characteristics (like browser viewport width, height, screen resolution, etc.). The following can be checked using media queries:

  • Dimensions (width and height) of the viewport
  • Dimensions (width and height) of the device
  • Orientation
  • Resolution