Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/loops/2.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 3拇指源_Javascript_Html_Fancybox - Fatal编程技术网

Javascript Fancybox 3拇指源

Javascript Fancybox 3拇指源,javascript,html,fancybox,Javascript,Html,Fancybox,如果我以这种格式打开图像组,fancybox将使用img作为缩略图,href作为大图像源 <a href="https://c1.staticflickr.com/9/8148/29324593462_abebaddc38_k.jpg" data-fancybox="images"> <img src="https://c1.staticflickr.com/9/8148/29324593462_f890687b7a_m.jpg" /> </a>

如果我以这种格式打开图像组,fancybox将使用img作为缩略图,href作为大图像源

<a href="https://c1.staticflickr.com/9/8148/29324593462_abebaddc38_k.jpg" data-fancybox="images">
      <img src="https://c1.staticflickr.com/9/8148/29324593462_f890687b7a_m.jpg" />
</a>

<a href="https://c2.staticflickr.com/6/5499/30972532232_051e1dc57e_h.jpg" data-fancybox="images">
      <img src="https://c2.staticflickr.com/6/5499/30972532232_e9a298a0c5_m.jpg" />
</a>
Fancybox将对拇指和大图像使用src

例如:


在这种情况下,有没有办法指定thumb源代码?

只需使用
thumb
选项传递源代码:

opts : {
    caption : 'First caption',
    thumb   : 'https://c1.staticflickr.com/9/8148/29324593462_f890687b7a_m.jpg'
}
演示-

opts : {
    caption : 'First caption',
    thumb   : 'https://c1.staticflickr.com/9/8148/29324593462_f890687b7a_m.jpg'
}