圆滑的轮播在初始化时加载了错误的宽度 [英] Slick carousel loads the wrong width on initialization

查看:48
本文介绍了圆滑的轮播在初始化时加载了错误的宽度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在页面加载时,在此的第一秒中,第一张幻灯片仅占据屏幕的一半,然后进行自我校正。这会导致不愉快/贪婪的负载体验。如果我通过检查监视元素代码,则可以看到内联宽度大约在页面加载的一秒钟内得到更新。有什么建议吗?

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆