css背景图有边框background: url

使用background: url设置背景图时有边框;

代码中没设置border,

代码如下:
<img class="div-result-img-success"
>

样式如下:
.div-result-img-success {
position: absolute;
top: 0;
left: 1.3rem;
width: 3.5rem;
height: 3.6rem;
background: url('//static.bnq.com.cn/fuli-success.png') center no-repeat;
background-size: contain;
border: none;
}

解决办法:最终发现是img使用background:url属性的问题。于是将img改为div解决问题


<div class="div-result-img-success "
>

猜你喜欢

转载自www.cnblogs.com/gznuhaoge/p/11608447.html
URL