background-size:1000%; doesn't work properly in Chrome

后端 未结 4 1524
无人及你
无人及你 2020-12-05 04:35

I\'m using an svg image as a background. I\'m trying to use CSS3\'s background-size: 100% 100%; but it doesn\'t seem to work, even in browsers which should supp

4条回答
  •  时光取名叫无心
    2020-12-05 05:15

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

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

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

    background-size: auto auto;
    

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

提交回复
热议问题