Lightbox2导航只能在桌面浏览器上使用,而不能在移动设备上使用

时间:2019-02-10 12:46:13

标签: javascript html lightbox2

如何让Lightbox2在移动设备上工作?它将拉起图像,但不会重叠显示。此外,它不会导航到组中的下一个图像。所有这些都适用于台式机版本。任何帮助是极大的赞赏。下面的相关代码:

<link href="https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.10.0/css/lightbox.min.css" rel="stylesheet" type="text/css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.10.0/js/lightbox-plus-jquery.min.js"></script>    

<div>
<p style="font-family: roboto, san-serif; font-style: normal; font-weight: 300; font-size: 1.4em;"><a href="images/Photo_Gallery/Dome Jails/ATT00007.jpg" data-lightbox="Completed Projects" data-title="Water Treatment, Communications, &amp; Electronic Buildings"><img src="images/Photo_Gallery/Dome Jails/ATT00007SM.jpg" alt="Commercial/Industrial Buildings"></a>
<a href="images/Photo_Gallery/Dome Jails/dome-pics-030.jpg" data-lightbox="Completed Projects" data-title="Air Tight &amp; Chemical Resistant"><img src="images/Photo_Gallery/Dome Jails/dome-pics-030SM.jpg" alt="Commercial/Industrial Buildings"></a>
</div>

<script>
        lightbox.option({
          'alwaysShowNavOnTouchDevices': true,
                'wrapAround': false,
        })
 </script>

HTML :(仅复制2张图像以缩短它)

0 个答案:

没有答案