SVG作为谷歌浏览器的背景不显示

时间:2015-10-23 11:03:13

标签: html css svg

html:

`<a href="https://somelink" rel="noreferrer" target="_blank" class="btn popupLogo btn-link btn-xs"></a>`

的CSS:

.popupLogo {
width: 100%;
height: 25px;
background: center no-repeat url(../img/logo.svg);
}

谷歌浏览器没有显示svg,我也尝试使用object,但结果svg被下载但没有显示,是否有可行的解决方案?

1 个答案:

答案 0 :(得分:0)

我发现(在我的情况下)当您在一个css命令中编写一些语句时,Chrome有时会出现问题:background: center no-repeat url(../img/logo.svg);

试试这样:

background-image: url("../img/logo.svg");
background-repeat: no-repeat;
background-position: center;
相关问题