img标签src没有图片路径出现边框解决方法

一、

<div class="logo logo-img"> 
    <a href="#"><img src="" class="logo-img" /></img></a> 
</div>

CSS

.logo img[src = ""]{opacity:0;}
.logo-img {background:url(../img/logo.png) no-repeat center;}

二、

<div class="logo logo-img"> 
		<a href="#"><div class="logo-img"></div></a> 
	</div>

CSS

.logo-img {background:url(../img/logo.png) no-repeat center;}