CSS3 @media Rule

The @media rule is used to define different style rules for different media types/devices.

Example
Change the background-color if the viewport is 480 pixels wide or wider:

@media screen and (min-width: 480px) {
    body {
        background-color: lightgreen;
    }
}

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.