Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 BxSlider v4.1,我注意到使用“adaptiveHeight”选项会计算错误的幻灯片高度。原因是在背景中加载图像,同时在幻灯片之间导航。
有没有办法强制重新计算幻灯片高度?
我的第一个解决方案是在 css 中设置 min-height,但这不能正常工作。
try moving the bxSlider initialization into $(window).load instead of $(document).ready.
$(window).load
$(document).ready
Moving it to $(window).load waits for all images to completely load before initializing bxSlider, which will allow it to properly calculate the heights.