为什么图片之间有空格? http://jsfiddle.net/dasmus/6Ltrs9tw/<a>元素之间的空格
CSS
.gallery{
width:900px;
height:640px;
}
a{
display:inline-block;
}
a img{
width:200px;
height:141px;
}
HTML
<div class="gallery">
<a ><img src="http://1.1.1.1/bmi/alpatriott.ru/works/album/images/smile.jpg"></a>
<a ><img src="http://1.1.1.1/bmi/alpatriott.ru/works/album/images/smile.jpg"></a>
<a ><img src="http://1.1.1.1/bmi/alpatriott.ru/works/album/images/smile.jpg"></a>
<a ><img src="http://1.1.1.1/bmi/alpatriott.ru/works/album/images/smile.jpg"></a>
</div>
参见:http://stackoverflow.com/questions/19038799/why-is-there-an-unexplainable-gap-between -these-inline-block-div-elements .. http://stackoverflow.com/questions/5078239/how-to-remove-the-space-between-inline-block-elements – 2014-10-05 17:23:55
Thanks http://stackoverflow.com/a/19038859/1690081这是诀窍。 (也浮动作品)为什么它会尊重whitespacejesus。 – 2014-10-05 17:36:57