Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/283.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 我想在fancybox中显示我的图像,但我的fancybox不工作_Javascript_Php_Html_Twitter Bootstrap_Fancybox - Fatal编程技术网

Javascript 我想在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

我有用于图像库的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="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我上传了这些文件。