简单的 jQuery 画廊,可以动态加载内容
我需要一些 jQuery 插件、教程或指南来创建简单图像库,其内容可以动态加载,它会一次显示一张图像,并且通过向左滑动或滑动来更改该图像正确的。
我尝试过 jCarousel,但我无法使其一次仅显示一张具有动态加载内容的图像。
I need some jQuery plugin, tutorial or guidelines to create simple image gallery which content could be loaded dynamically, it would display one image at the time, and that image would be changed by sliding it to the left or right.
I have tried jCarousel, but I could not manage to make it show only one image at the time with dynamically loaded content.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以按照以下步骤管理 jCarousel 本身来实现一次显示一张图像的要求。
将 jCarousel 配置选项“scroll”设置为“1”。此选项将使您的轮播一次仅滚动一张图像。
然后根据您的图像尺寸更改图像容器的皮肤样式(宽度、高度和填充)。
例如,如果您的图像尺寸为 100x100,则将图像容器的宽度和高度更改为 100px 和 100px,并添加一些填充(例如 10px),以便一次只显示一张图像。
尝试此解决方案,如果您在进行这些更改时遇到任何问题,请告诉我。
西瓦...
You can manage the jCarousel itself to achieve your requirement of showing one image at a time by following these steps.
Set the jCarousel configuration option of 'scroll' as '1'. This option will make your carousel to scroll only one image at a time.
Then change the skin styles(width, height and padding) of image containers according to your image dimensions.
For example if your images are of size 100x100 then change the image container's width and height as 100px and 100px and add some padding like 10px so that only one image will appear at a time.
Try this solution and let me know if you are facing any problem while making these changes.
Siva ...
我此时也在研究jquery滑块,我使用这个 - http://www.gcmingati.net/wordpress/wp-content/lab/jquery/svwt/
这是一个很酷的东西并且完全可定制。
I also working on jquery slider at this time and I use this one - http://www.gcmingati.net/wordpress/wp-content/lab/jquery/svwt/
It's such a cool stuf and fully customizeable.