如何固定标签“li”的大小?
I'm trying to create a menu like this or this.
But I am trying all ways to fix the size of the tag "read" but I can not.
I'm in the beginning, to see where I am.
Notice that when the user hovers the tag "a" changes the background color.
Please, if you can change the code and show me how.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
使用
display:inline-block;
而不是内联。Use
display:inline-block;
instead of inline.你的问题是你已经指定了 display:inline;并从那时起对其进行样式设置,您必须将其删除,或者像他们所说的那样更改为内联块,然后重新设置菜单样式。
Your problem is that you've specified display:inline; and styled it from that point, you'll have to remove that, or change to inline-block like they said, and re-style your menu.
您不能声明内联 li 的宽度,请使用
You cant declare width for an inline li , use