这是我的博客主页http://lowcoupling.com/ 它是一个基于 Twitter bootstrap 的 tumblr 博客。我试图让页脚中的徽章代表主要主题,以这种方式在垂直方向上更加分离:
<span style="margin-left:2px; margin-top:5px;"> <a href="http://lowcoupling.com/tagged/UML/chrono"><span class="label label-default">UML</span> </a></span>
问题是左边距有效,但上边距无效。
最佳答案
您需要设置display:block;
并将它们向左浮动。最好创建一个这样的类:
HTML:
<span class="footer-link">
<a href="http://lowcoupling.com/tagged/UML/chrono">
<span class="label label-default">UML</span>
</a>
</span>
CSS:
span.footer-link{
display:block;
float:left;
margin:5px 0 0 2px;
}
关于html - Bootstrap 标签上的 css 左边距和上边距,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19462614/