Code Log 3: CSS Media Queries

What are Media Queries?

Media Queries are CSS code that allow you to apply styles to certain aspects of the screen by testing for various features. Some examples include:

How Does a Media Query Work?

A Media Query is basically CSS’s version of an if statement. You use it to check for characteristics of the user’s device. It allows a website to be responsive to the users. Below is an example of usage to change background-colors for screens with 1200px or less.

>