Why background-repeat: no-repeat doesn't work with .svg images in Opera 12?

烂漫一生 提交于 2019-12-02 12:38:15

问题


I got stuck with a strange problem in Opera 12: I have an .svg image which is linked within my css code. When I resize to zoom-out the page where the image is displayed, Opera repeats the image as if I didn't use the "no-repeat" value in background-repeat. What am I missing?

Here is my css code:

.svgImg {
    background: url("../img/img.svg") no-repeat;
    height:100%;
    width:100%;
}

I also tried this:

.svgImg {
     background: url("../img/img.svg");
     background-repeat:no-repeat;
     height:100%;
     width:100%;
 } 

But it didn't work. Why opera does that?


回答1:


.svgImg {
background: url("../img/img.svg") no-repeat;
height:100%;
width:100%;
}


来源:https://stackoverflow.com/questions/20819153/why-background-repeat-no-repeat-doesnt-work-with-svg-images-in-opera-12

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!