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.
不太了解,但是如果您想要相同大小的包装器而不是仅仅使用display: block;,因为<a>它是一个内联元素,因此您需要将其设为块级元素,或者如果您想要内联块,只需使用display: inline-block;
display: block;
<a>
display: inline-block;
<style> a { background: #DDD; border: #BBB; padding:1px; width: 20em; height: 2em; display: block; <------ Add This } </style>