FancyBox 画廊集成
我有一个关于 FancyBox 集成的问题。 我会创建一个包含 10 张图片但只有一张缩略图的图库。 例如: http://fancyapps.com/fancybox/demo/ 第一个演示展示了四个图像:森林、海洋、日落和埃菲尔铁塔。 我可以添加一个缩略图吗,例如埃菲尔铁塔的缩略图,单击该缩略图后,会在灯箱中显示埃菲尔铁塔的图像,还有森林、海洋和日落的图像。 我尝试了很多东西,但没有任何效果正常。 如果您有任何想法... 非常感谢。
附: 我使用 Twitter Bootstrap-1.3 & FancyBox-2
I have a question regarding the integration of FancyBox.
I would create a gallery with 10 pictures but only one thumbnail.
For example:
http://fancyapps.com/fancybox/demo/
The first demonstration shows four images : forest, sea, sunset and Effeil tower.
Can I include a single thumbnail, for example a thumbnail of the Eiffel Tower, which on clicked, would display the image of the Eiffel Tower in the lightbox, but also those of the forest, sea and sunset.
I tried many things but nothing works properly.
If you have any ideas...
Many Thanks.
PS:
I use the Twitter Bootstrap-1.3 & FancyBox-2
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要一个指向图库中所有图像的链接,无论它们是否显示缩略图,因此您可能有这个 html
等...这样,仅显示一个缩略图,其余链接不可见但功能正常。
然后像这样的脚本将触发画廊
You need a link to all the images in your gallery regardless they show a thumbnail or not so you may have this html
etc. ... in that way, only a single thumbnail is shown and the rest of the links are not visible but functional.
Then a script like this will fire the gallery
您只需将 display:none 添加到您不想显示的链接即可。
例如 http://jsfiddle.net/MvvuE/
You can simply add display:none to the links you don't want to show.
e.g. http://jsfiddle.net/MvvuE/