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.
锚元素默认设置为内联元素。在添加宽度属性之前,您需要将其显示显式设置为阻塞:
a { display: block; }
看到这个jsFiddle。
给<a> display: block;它,它应该占用列表项的可用空间,因此完全“可点击”..
<a>
display: block;