Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/399.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 使用第页滚动绝对位置div_Javascript_Jquery_Html_Css - Fatal编程技术网

Javascript 使用第页滚动绝对位置div

Javascript 使用第页滚动绝对位置div,javascript,jquery,html,css,Javascript,Jquery,Html,Css,我使用的是fancybox 2,我希望fancybox模式能够与页面一起滚动,而不是固定在中间并具有最大高度。我该怎么做 $('.fancybox-open').fancybox({ openEffect : 'none', closeEffect : 'none', width: '100px', 'closeBtn' : true, afterLoad : function() { this.content.html()

我使用的是fancybox 2,我希望fancybox模式能够与页面一起滚动,而不是固定在中间并具有最大高度。我该怎么做

$('.fancybox-open').fancybox({
     openEffect  : 'none',
     closeEffect : 'none',
     width: '100px',
     'closeBtn' : true,
     afterLoad   : function() {
        this.content.html();
     }
});

您可以在初始化FancyBox时使用选项
autoCenter:false

能否显示您的代码…@siza I添加了代码。