[ACCEPTED]-background-size:100% 100%; doesn't work properly in Chrome-background-image

Accepted answer
Score: 94

Here's a workaround:

Open your .svg file, find 2 the <svg> tag at the beginning and add the following 1 property inside it:

preserveAspectRatio="none"

Source: http://www.yootheme.com/support/question/6801?order=modified

Score: 2
background-size: cover

Works across the board. Tested w/ Safari, Chrome, & FF.

0

Score: 2

It turns out this is a known bug in Chrome 3 that is specific to svg background images. I'm 2 running v 17.0.963.56, in case anyone cares, and 1 you can track the bug here.

Score: 1

This is still an issue in Chrome 39, but 7 not in Firefox. I ran into it when scaling 6 a background SVG like so:

background-image: url(bg.svg);
background-repeat: repeat-x;
background-size: 1200px auto;

Even with exact 5 on-the-pixel horizontal dimensions in the 4 SVG I got a small gap. It worked when I 3 didn't scale it:

background-size: auto auto;

Not much of a solution not 2 to be able to scale your background, but 1 still.

More Related questions