Javascript 我想在fancybox中显示我的图像,但我的fancybox不工作
我有用于图像库的fancybox,在这里,我添加了Javascript 我想在fancybox中显示我的图像,但我的fancybox不工作,javascript,php,html,twitter-bootstrap,fancybox,Javascript,Php,Html,Twitter Bootstrap,Fancybox,我有用于图像库的fancybox,在这里,我添加了data fancybox=“gallery”,但它不能正常工作 我的代码: <section id="gallery" class="bg-lighter"> <div class="container-fluid pt-70 pb-0"> <div class="section-title text-center"> <div class="ro
data fancybox=“gallery”
,但它不能正常工作
我的代码:
<section id="gallery" class="bg-lighter">
<div class="container-fluid pt-70 pb-0">
<div class="section-title text-center">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<h2 class="text-uppercase title" >Our <span class="text-white font-weight-300">Gallery</span></h2>
</div>
</div>
</div>
<div class="section-content">
<div class="row">
<div class="col-md-12">
<div class="gallery-lsit">
<?php foreach ($gallery_imgs as $img):?>
<figure class="col-md-3">
<a class="img-popup pan" data-fancybox="gallery" href="<?php echo base_url();?><?php echo $img['image_url']; ?>">
<img alt="picture" src="<?php echo base_url(); echo $img['thumbnail_url']; ?>" class="img-fluid">
</a>
<h3 class="text-center my-3"><?php echo $img['title']?></h3>
</figure>
<?php endforeach;?>
</div>
</div>
</div>
</div>
</div>
</div>
我们的画廊
在上面的代码中,它只是打开图像,但在这个代码中没有
取消
按钮和下一步
或上一步
按钮缺失。@kerbholz我删除了该代码您的标题说您正在使用lightbox,但数据fancybox
表明您正在使用fancybox,这是哪一个?@kerbholz但是fancybox
也不工作你在用哪一个?您是否在html中包含/加载了适当的脚本/样式?你的浏览器控制台有错误吗?@kerbholz我上传了这些文件。