光滑的轮播在初始化时加载错误的宽度 [英] Slick carousel loads the wrong width on initialization
本文介绍了光滑的轮播在初始化时加载错误的宽度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在页面加载的第一秒内,第一张幻灯片仅占据屏幕的一半,然后自行更正.它会导致不愉快/活泼的加载体验.如果我通过检查监视元素代码,我可以看到内联宽度在页面加载后大约一秒钟内更新.有什么建议吗?
On page load, for the first second of so, the first slide only takes up half of the screen before correcting itself. It is causing an unpleasant/snappy load experience. If I monitor the elements code via inspect I can see the inline width get updated about a second into page load. Any suggestions?
推荐答案
我也有同样的问题解决方案是从上一张幻灯片 (initialSlide: ...) 开始并调用 slick('slickNext')
i have same problem solution is start from prev slide (initialSlide: ...) and call slick('slickNext')
这篇关于光滑的轮播在初始化时加载错误的宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文