我不知道为什么,但我有两种类型的画廊,其中一种使用fancybox和同位素插件,如果我以这种格式传递图像:
<img src="data:image/jpg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD// gA8Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSlBFRyB2NzApLCBxdWFsaXR5ID0gMTAwCv/bAEMAAQEBAQEBAQEBAQEB......
它工作,代码是(显示来自mysql的图像):
<a class="fancybox img-responsive" href="data:<?php echo $dati['image_type'];?>;base64,<?php echo base64_encode($dati['image_big']);?>" data-fancybox-group="gallery" title="">
<img src="data:<?php echo $dati['image_type'];?>;base64,<?php echo base64_encode($dati['image_big']);?>" class="img-responsive all <?php echo $nome_album;?>" alt="gallery">
</a>
但是,如果我使用这个代码(与同位素和fancybox togheter一起使用):
<a class="fancybox img-responsive" href="data:<?php echo $dati['image_type'];?>;base64,<?php echo base64_encode($dati['image_big']);?>" data-fancybox-group="gallery" title="">
<img src="data:<?php echo $dati['image_type'];?>;base64,<?php echo base64_encode($dati['image_big']);?>" class="img-responsive all <?php echo $nome_album;?>" alt="gallery">
</a>
它不起作用..我做了一些搜索,但我找到的解决方案是旧版本的fancybox ..