I am creating a website that is going to use an image that I cannot tile. I need this image to cover the entire background screen. However, I want this to work on large monitors as well as smaller monitors.
Should I make one large background image and scale it down using background-size
or should I create multiple versions of the same image at various sizes then use CSS3 Media Queries to choose which image should be shown? If so what break points in screen size should I use?
You can use
background-size
property set tocontain
orcover
. This works especially well for photographic backgrounds (as opposed to patterns) where scaling artefacts are not as obvious.Compare the two: contain vs cover
Remember about setting up a fallback rule for IE8 and under (just a stretched background should suffice).
I ended up choosing five breakpoint based on information from StatCounter:
This is up till December 2012.
Based off of these numbers, my testing, and speaking to others I chose the following options:
This should stretch it in every browser in every screen.
I would just use the big one on all of them.