O'Reilly logo

Responsive Web Design with HTML5 and CSS3 by Ben Frain

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Responsive considerations for CSS3

It's worth remembering that different declarations can be used for different viewports. For example, although I might not mind the way the gradient pattern looks on smaller viewports:

Responsive considerations for CSS3

I may choose not to use it for larger viewports (for example 768 px wide and greater). I can therefore just create a specific rule for the background gradient using media queries:

@media screen and (max-width: 768px) { body { background-color:white; background-image: radial-gradient(hsla(0, 0%, 87%, 0.31) 9px, transparent 10px), repeating-radial-gradient(hsla(0, 0%, 87%, 0.31) 0,hsla(0, 0%, 87%, 0.31) 4px, transparent 5px, transparent ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required