CSS:菜单上的动态宽度

发布于 2024-07-24 08:09:51 字数 450 浏览 14 评论 0原文

精确重复

CSS 帮助,使菜单流畅

菜单在固定宽度下工作正常,但我想要仅在顶部菜单类别上换行的单词。 我需要能够有 n 个类别并且宽度均匀分布。 显然 n 是合理的(我不会有 50 个类别),但我需要能够添加更多类别,而不用担心达到宽度限制。

谢谢你的帮助。

链接:

http://www.seth-duncan.com/Test/TestMenu.html< /a>

Exact Duplicate of

CSS Help, Making Menu Fluid

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:

http://www.seth-duncan.com/Test/TestMenu.html

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

挽容 2024-07-31 08:09:51

并且宽度分布均匀

只有表格(或 CSS display:table)才会给你这种行为,除非你用 JS 计算宽度(不容易或理想)。

and have the width be evenly distributed

Only tables (or CSS display:table) will give you this behaviour unless you calculate widths with JS (not easy or ideal).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文