如何修改fancybox框的定位?我希望它被定位,以便它在我的容器 div 中浮动...
感谢您的所有时间和帮助!
jquery.fancybox-1.2.6 的第 255 行有这段代码
var itemOpts = {
'left': itemLeft,
'top': itemTop,
'width': width + 'px',
'height': height + 'px'
};
更改“左”值以向左或向右移动花式框
您可以使用以下方法影响包装器的位置以进行微调:
$("#fancybox-wrap").css("margin-left","-75px");
$("#fancybox-wrap").css("margin-top","60px");
但是您必须根据需要对其进行调整,并计算视口尺寸。
尝试将这样的内容放入您的 jquery 中:
$("#fancy_outer").css({"float":"right","position":"static"});