【发布时间】:2021-01-18 00:09:53
【问题描述】:
我正在尝试使用灯箱实现图片库,但它不起作用
these are the script I've called in the head
<script src="https://kit.fontawesome.com/1ae30b6763.js"></script>
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
<script src="{{ asset('js/app.js') }}" ></script>
<script src="{{ asset('js/lightbox.min.js') }}" ></script>
这是我的 CSS 链接
<link href="{{ asset('css/app.css') }}" rel="stylesheet">
<link href="{{ asset('css/welcome.css') }}" rel="stylesheet">
<link href="{{ asset('css/lightbox.min.css') }}" rel="stylesheet">
这些是我的 galler.blade.php
中的代码<div class="row">
@foreach ($galleryImages as $galleryImage)
<div class="col-md-4 mb-2 ">
<div class="card">
<div class="card-body">
<img class="gallery-image" src="{{ asset('gallery_images/'.$galleryImage->image) }}" data-lightbox="roadtrip" alt="" style="width:100%">
</div>
</div>
</div>
【问题讨论】: