我在我的页面 www.woody.my 的底部使用水平轮播,轮播使用 chrome 资源管理器可以正常工作,而使用 firefox、opera、IE 则不可见。
下面是图片在 chrome 中的样子:
虽然这是它在 firefox 中的样子:
最佳答案
这在 HTML 中
<ul style="width: 1000px;">
CSS 行中的这个:526
.infiniteCarousel ul li {
background: url("../images/footer_img_box.png") no-repeat scroll 0 0 transparent;
display: block;
float: left;
height: 220px;
padding: 10px;
position: relative;
width: 198px;
}
.infiniteCarousel .wrapper ul {
width: 900px;
list-style-image: none;
list-style-position: outside;
list-style-type: none;
padding: 0;
top: 0;
}
虽然 <li>
的位置是绝对的,它们会堆叠在一起。需要将位置更改为相对位置,主容器的尺寸也非常大,为 9999px,将其更改为视口(viewport),以便当元素彼此 float 时您可以看到它们
同时删除 .infiniteCarousel .wrapper ul
上的位置类
关于html - carousel jquery 在 firefox 和 opera 中不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15263042/