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

tonix picture tonix · Dec 28, 2013 · Viewed 13.3k times · Source

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?

Answer

jeyhun_mikayil picture jeyhun_mikayil · Apr 1, 2021

Try:

background-repeat:no-repeat!important;

Worked for me on Firefox v.88