1.块间距
案例摘自:
http://www.zhangxinxu.com/study/201204/inline-block-space-example.html
去除方法(只写了简单的实用的,高级方法请看http://www.zhangxinxu.com/study/201204/inline-block-space-example.html):
第一种:
<div class="space"> <a href="##">惆怅</a ><a href="##">淡定</a ><a href="##">热血</a> </div>
第二种借助HTML注释:
<div class="space"> <a href="##">惆怅</a><!-- --><a href="##">淡定</a><!-- --><a href="##">热血</a> </div>
这种间距我看原网页也没有说明,故特地补充;
如果这几个元素处于不同行的
<div>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
而我想要的是两行之间只有1px;
那么我们可以对外围div设置line-height:0px;即可,先上图
<span></span>
<span></span>