CSS @media Rule Example Change the background color of the <body> element to "lightblue" when the browser window is 600px wide or less: Syntax @media only screen and (max-width: 600px) { body { background-color: lightblue; } }
@media only screen and (max-width: 600px) { body { background-color: lightblue; } }