有没有办法显示 jquery 手风琴中的所有内容(没有滚动条)
Autoheight : false
似乎没有效果。即使它确实有效,听起来也不像我所需要的,因为其中一个部分可能非常长,而接下来的部分非常短,而且我不希望两个部分具有相同的高度。
显示内容的 div 可以具有可变高度,因此我不能使用固定高度。我已经尝试了大多数选项,但它们似乎都没有达到我想要的效果,但我认为我错过了一些东西,因为这听起来应该是一个常见的要求,因为手风琴中的滚动条看起来相当可怕。
Autoheight : false
seems to have no effect. Even if it did work it doesnt sound like its what I need since one section could be really long and the fololowing really short and I wouldnt want the two sections with the same height.
The div in which the content is displayed can be of variable height so I cannot use a fixed height. I have tried most of the options and none of them seem to have the effect I want but I think I am missig something as this sounds like it should be a common requirement since scollbars in the accordion look rather horrible.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您是否尝试过将 Accordion 的高度和宽度显式设置为内容?例如,将内容加载到隐藏的 div 中,然后获取其尺寸。然后调整 Accordion 的大小并加载内容以适合。
Have you tried to explicitly set the Height and Width of the Acccordion to the content? For example load the content into a hidden div and then get its dimensions. Then resize the Accordion and load the contents to fit.
使用这一行代替:
Use this line instead:
它是自动的,带有一个小a
It is auto with a small a