【发布时间】:2017-08-03 08:45:30
【问题描述】:
我正在一家商业网站实习,我被要求添加产品图像的 Fancybox 显示。它看起来不错,但缺少导航按钮。但是,我仍然可以在图片之间导航。
是的,它被设置为图库,我查看了其他帖子,照片必须在同一个地方。
但正如我所说,画廊工作,但没有按钮,我完全没有想法。
该项目使用了很多东西,但我将添加我添加代码的地方。 它使用 Thymeleaf、Spring、bootstrap、fancybox 2.1.5 等,我目前正在开发 IntelliJ IDE。此外,我可以在项目的“_main.less”上编辑 fancybox 属性。
$(".zoomPic").fancybox({
'transitionIn': 'fade',
'transitionOut': 'fade',
});
<div class="bgstretch slide zoomPic"
th:style="${'background-color: #' + image.colour}"
th:each="image : ${product.images}" data-fancybox-group="gallery"
th:attr="data-fancybox-href='#fancyGallery'+__${image.id}__">
<span th:attr="data-srcset=${image.path},data-imageid=${'image' + image.id}"></span>
<div th:id="'fancyGallery'+__${image.id}__" style="display: none;">
<img th:src="${image.path}" style="width:100%;height:100%;"/>
</div>
</div>
实际上并不需要一个工作按钮。左右浮动的人字形就足够了。所以,我愿意接受有关直接将它们放在前面的建议,但我也不知道该怎么做。 关闭按钮和我需要的所有其他功能都可以工作,但这不是。
【问题讨论】:
标签: javascript jquery html thymeleaf fancybox-2