2017-08-24 150 views

回答

0

可以,例如,使用clickContent选项:

$('[data-fancybox]').fancybox({ 
    clickContent : function(current, event) { 
    return current.type === 'image' ? 'zoom' : 'close'; 
    } 
}); 

使用这个片段中,点击图像将放大,但其他内容 - 关闭。

Demo - https://codepen.io/anon/pen/WEKmoB