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 "
>

 

 

 

posted @ 2019-09-29 16:11  文晓豪  阅读(3035)  评论(0编辑  收藏  举报