为什么要进行背景重复:否重复在Opera 12中不适用于.svg图像? [英] Why background-repeat: no-repeat doesn't work with .svg images in Opera 12?

查看:95
本文介绍了为什么要进行背景重复:否重复在Opera 12中不适用于.svg图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Opera 12中陷入一个奇怪的问题:我的CSS代码中链接了一个.svg图像.当我调整大小以缩小显示图像的页面时,Opera会重复图像,好像我没有在背景重复中使用"no-repeat"值一样.我想念什么?

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?

这是我的CSS代码:

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

我也尝试过:

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

但是没有用. 为什么要歌剧?

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

推荐答案

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

这篇关于为什么要进行背景重复:否重复在Opera 12中不适用于.svg图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆