Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我将dt和他的dd元素放在一行中时:
display: inline-block; margin: 0px;
这两者之间仍然会有一点差距。我发现的一个解决方案是:
margin-left: -4px;
但是就没有更好的解决方法吗?
是的,空格是因为内联块是内联流的一部分,这意味着任何换行都会导致空格。有几种解决方案:
font-size: 0
这是一篇关于这个主题的好文章。