What does @media screen and (max-width: 1024px) mean in CSS?

I found this piece of code in a CSS file I inherited, but I can’t make any sense out of it:

@media screen and (max-width: 1024px){
    img.bg {
        left: 50%;
        margin-left: -512px; }
}

Specifically, what is happening on the first line?

9 Answers
9

Leave a Comment