如何显示模态图像?有什么办法吗?
$(function(){ $('。sensitive')。slick({ 行:2 slidesToShow:4 slidesToScroll:2 自动播放:是的, 自动播放速度:2000, 点:正确, 箭头:假 });
<div class="row">
<!-- Modal -->
@foreach ($compOne_works as $compOne_work)
<div style="z-index: 10000;" class="modal fade" id="Modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Image title</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<img src="{{ asset('uploads/works/'.$compOne_work->image) }}" alt="" height="100%" width="100%">
</div>
</div>
</div>
</div>
@endforeach
<!-- Modal -->
<h1>WORKS </h1>
<div class="responsive">
@foreach ($compOne_works as $compOne_work)
<div>
<a href="#" data-toggle="modal" data-target="#Modal"><img class="work-img" src="{{ asset('uploads/works/'.$compOne_work->image) }}" alt="" height="300px" width="345px"></a>
</div>
@endforeach
</div>
</div>
是否可以通过单击图像以模态显示图像?