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

 

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM