我有一个非常非常简单的布局和设计,但我无法设置链接的垂直边距。这是一个简短的例子:
<a href="http://www.google.de/">Google</a>
<a href="http://www.youtube.com/" style="margin-top: 20px; ">YouTube</a>
<a href="http://www.foo.de/">Bar</a>
每次第二个链接与所有其他链接具有相同的边距。这是谷歌浏览器的错误吗?如何解决这个问题?
编辑:
有没有办法在不将链接包装在 div
中的情况下解决它?
最佳答案
是这样的吗?
<a href="http://www.google.de/">Google</a>
<a href="http://www.youtube.com/" style="display:inline-block;margin-top: 20px;">YouTube</a>
<a href="http://www.foo.de/">Bar</a>
关于html - Google Chrome 中链接的垂直边距,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21479665/