CSS:菜单上的动态宽度
精确重复
菜单在固定宽度下工作正常,但我想要仅在顶部菜单类别上换行的单词。 我需要能够有 n 个类别并且宽度均匀分布。 显然 n 是合理的(我不会有 50 个类别),但我需要能够添加更多类别,而不用担心达到宽度限制。
谢谢你的帮助。
链接:
Exact Duplicate of
The menu works fine with fixed width but I would like the words to wrap ONLY on the top menu categories. I need to be able to have n categories and have the width be evenly distributed. Obviously n would be within reason (I am not going to have 50 categories) but I need to be able to add more and not worry about hitting my width limit.
Thanks for any help.
Link:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只有表格(或 CSS display:table)才会给你这种行为,除非你用 JS 计算宽度(不容易或理想)。
Only tables (or CSS display:table) will give you this behaviour unless you calculate widths with JS (not easy or ideal).