Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/36.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 使用intro.js关注单个容器时,将背景扩展到整个页面_Javascript_Css_Intro.js - Fatal编程技术网

Javascript 使用intro.js关注单个容器时,将背景扩展到整个页面

Javascript 使用intro.js关注单个容器时,将背景扩展到整个页面,javascript,css,intro.js,Javascript,Css,Intro.js,我正在使用intro.js浏览特定元素 introJs("#section1").start() 即使只关注一个元素,我是否有办法将背景扩展到整个页面 (尝试激活底部部分的巡更) 我已尝试覆盖introjs覆盖 .introjs-overlay { width:100%!important; height:100%!important; top:0!important; left:0!important; } 但是将top设置为0会将覆盖部分固定到页面顶部(如果未覆盖,则

我正在使用
intro.js
浏览特定元素

introJs("#section1").start()
即使只关注一个元素,我是否有办法将背景扩展到整个页面

(尝试激活底部部分的巡更)

我已尝试覆盖
introjs覆盖

.introjs-overlay { 
  width:100%!important; 
  height:100%!important;
  top:0!important;
  left:0!important;
}
但是将
top
设置为0会将覆盖部分固定到页面顶部(如果未覆盖,则它会粘附到指定的元素)。

这应该可以修复它:

.introjs-overlay {
   position: fixed!important;
}

我的意思是将此添加到您已经进行的覆盖中。固定位置应使覆盖层粘在窗口上,而不是粘在文档上。