|
Back to CSScss Lesson 6

Responsive Design

Making sites work on all devices.

Media Queries

Media query is a CSS technique introduced in CSS3. It uses the `@media` rule to include a block of CSS properties only if a certain condition is true.

css
@media only screen and (max-width: 600px) {
  body {
    background-color: lightblue;
  }
}

Try it yourself:

HTML
CSS
Result