我的 JS 幻灯片中的小问题
我的幻灯片有问题。
首先看:示例+代码 图像上边距中的问题显示了上一张图片的一部分,并且每次都会重复。 请帮我解决这个问题,我的代码有什么问题
I have problem in my slideshow .
First see the: example + code
The problem in the image top margin shows part of the previous picture and is repeated every time .
please help me to solve this problem , what's the wrong in my code
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
那是因为您的图像之间有一些空间。如果您在这里查看我的原始版本:http://jsfiddle.net/lionking/CyCDD/,你会看到我在 CSS 中设置了 font-size: 0 以确保图像之间没有空格。
您还需要强制幻灯片容器的宽度,以确保每行只有一张幻灯片。在您的示例中,如果您使窗口变宽,则每行将获得两张或更多张幻灯片。
That's because your images have some space between them. If you look at my original version of that here: http://jsfiddle.net/lionking/CyCDD/, you will see that I set font-size: 0 in the CSS to make sure there was no space between the images.
You will also need to force the width of your slideshow container to make sure that there is only one slide per row. In your example if you make the window wider, you get two or more slides per row.