Superfish 超级潜艇
我已经被困在这个问题上有一段时间了,非常感谢一些帮助。 我正在开发一个 superfish 水平下拉菜单。
我想知道如何使用超级子将下拉菜单项的宽度设置为下拉菜单中最大项目宽度的宽度。
默认为: $('ul.sf-menu').supersubs({ minWidth: 40, maxWidth: 41, extraWidth: 1 }).superfish();
我想要类似的东西: < code>$('ul.sf-menu').supersubs({ minWidth: 40, **maxWidth: auto or 100%**, extraWidth: 1 }).superfish();
我将不胜感激根本不。
问候, 拜伦
I've been stuck on this one for some time now and would really appreciate some assistance.
I'm developing a superfish horizontal dropdown menu.
I would like to know how to, using supersubs, set the width of the dropdown menu items to that of the largest items width in the drop down.
The default is : $('ul.sf-menu').supersubs({ minWidth: 40, maxWidth: 41, extraWidth: 1 }).superfish();
I would like something like : $('ul.sf-menu').supersubs({ minWidth: 40, **maxWidth: auto or 100%**, extraWidth: 1 }).superfish();
I would appreciate any help at all.
Regards,
Byron
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我遇到了 supersubs 有点问题的问题,我想出了一个更好的纯 CSS 替代方案。下拉列表
及其
子项不应设置宽度(或
width:auto;
如果需要,我想),并且两者都应设置为display:block;
您可以在 http://epraxadev.com/clcnewport/comp/supersubs.html
I was having trouble with supersubs being a little buggy, and I figured out a superior CSS-only alternative. The drop-down
<UL>
and it's<LI>
children should have no width set (orwidth:auto;
if needed, I suppose), and both should be set todisplay:block;
You can see an example at http://epraxadev.com/clcnewport/comp/supersubs.html
supersubs min 和 maxwidth 的单位是 em,而不是 % 或像素
supersubs min and maxwidth are in em's not % or pixels