jCarousel 无限循环 - 未设置宽度或高度
我已经设置 jcarousel 在元素消失时动态加载元素,然后让它们重新出现,
现在它给了我一个错误:“没有为项目设置宽度/高度。”
我已经尝试过这里描述的黑客: http://old.nabble.com/jCarousel:-No-width-height-set-for-items.-td13913308s27240.html
它导致 Firefox 崩溃(可能是因为它不断循环)
有什么想法吗?
I've setup jcarousel to dynamically load elements as they disappear and then have them reappear
now it's given me an error saying: "No width/height set for items."
I've tried the hack described here: http://old.nabble.com/jCarousel:-No-width-height-set-for-items.-td13913308s27240.html
and it caused firefox to crash (probably because it's looping constantly)
any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您需要在 .jcarousel-clip 容器上设置明确的高度
You need to set an explicit height on the .jcarousel-clip container
所以请忽略我对@TALLBOY 的评论回复。我能够通过指定 div.carousel-container 的宽度来解决此问题,该容器是初始化轮播时由代码添加的元素。
我在搜索过程中偶然发现了这一点:
http:// github.com/jsor/jcarousel/issuesearch?state=open&q=width#issue/22
So ignore my comment response to @TALLBOY. I was able to fix this issue by specifying a width for div.carousel-container which is an element that is added by the code when the carousel is initialized.
I stumbled across this during my searches:
http://github.com/jsor/jcarousel/issuesearch?state=open&q=width#issue/22
伙计们,这应该可以工作
当你输入高度和宽度时,它应该出现在你的 css 文件中。
Guys this should work
When you put your height and width in, in your css file it should appear.