如何在 fancybox 窗口中使用背景图像? 这可能吗?如果可以,该怎么做?
最佳答案
你的目标内容,例如 inline
内容,应该有这样的背景图片:
html
<div style="display:none">
<div id="inline"></div>
</div>
CSS
#inline {
background: url("http://thumbnails.illustrationsource.com/huge.103.519781.JPG") top left no-repeat;
width: 344px;
height: 450px;
}
jQuery
$(".fancybox").fancybox({
autoScale : false // use fitToView for v2.x
});
参见 JSFIDDLE
关于jquery - fancybox 中的背景图片?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20598374/