0
我無法制作最簡單的Bootstrap-Image-Gallery示例。Bootstrap-Image-Gallery不顯示完整圖像
我從他們的網站下面的HTML:
<!DOCTYPE HTML>
<head>
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="bower_components/blueimp-gallery/css/blueimp-gallery.min.css">
<link rel="stylesheet" href="bower_components/Bootstrap-Image-Gallery/css/bootstrap-image-gallery.min.css">
</head>
<body>
<!-- The Bootstrap Image Gallery lightbox, should be a child element of the document body -->
<div id="blueimp-gallery" class="blueimp-gallery">
<!-- The container for the modal slides -->
<div class="slides"></div>
<!-- Controls for the borderless lightbox -->
<h3 class="title"></h3>
<a class="prev">‹</a>
<a class="next">›</a>
<a class="close">×</a>
<a class="play-pause"></a>
<ol class="indicator"></ol>
<!-- The modal dialog, which will be used to wrap the lightbox content -->
<div class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" aria-hidden="true">×</button>
<h4 class="modal-title"></h4>
</div>
<div class="modal-body next"></div>
<div class="modal-footer">
<button type="button" class="btn btn-default pull-left prev">
<i class="glyphicon glyphicon-chevron-left"></i>
Previous
</button>
<button type="button" class="btn btn-primary next">
Next
<i class="glyphicon glyphicon-chevron-right"></i>
</button>
</div>
</div>
</div>
</div>
</div>
<div id="links">
<a href="images/banana.jpg" title="Banana" data-gallery>
<img src="images/thumb.jpg" alt="Banana">
</a>
</div>
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="bower_components/blueimp-gallery/js/jquery.blueimp-gallery.min.js"></script>
<script src="bower_components/Bootstrap-Image-Gallery/js/bootstrap-image-gallery.min.js"></script>
</body>
這表明香蕉的縮略圖,但是當我點擊它,頁面只是變成黑色,並且沒有發生。
爲什麼?我究竟做錯了什麼?
所有prerequesities基本滿意:
- jQuery 3.1.0
- Gallery 2.21.3
- Bootstrap-Image-Gallery 3.4.2
在控制檯中沒有錯誤。
您是否曾嘗試將腳本放在頭部? –
另外,在github中,它說blueimpv2.16.0是必需的。它被添加了嗎? –
@ Kode.Error404是的,我正在使用Gallery 2.21.3 – FrozenHeart