Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/71.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
Html iframe在后台有z索引,没有菜单控件?_Html_Css_Iframe_Z Index - Fatal编程技术网

Html iframe在后台有z索引,没有菜单控件?

Html iframe在后台有z索引,没有菜单控件?,html,css,iframe,z-index,Html,Css,Iframe,Z Index,我正在开发一个网页,它把一个iframe作为背景,因为其他div元素“在玩它”。使用z-index,它位于背景区域,可见,但我需要能够控制它,并且通常存在的控件缺失。以下是主要代码: 以下是html: <div class="bg-about"> <iframe src="https://player.vimeo.com/video/54960454?title=0&amp;byline=0&amp;portrait=0;autoplay=1"><

我正在开发一个网页,它把一个iframe作为背景,因为其他div元素“在玩它”。使用z-index,它位于背景区域,可见,但我需要能够控制它,并且通常存在的控件缺失。以下是主要代码:

以下是html:

<div class="bg-about">
  <iframe src="https://player.vimeo.com/video/54960454?title=0&amp;byline=0&amp;portrait=0;autoplay=1"></iframe>
  <div id="iframe"></div>
</div>
有什么想法吗?我真的需要控制装置。
注意:背景实际上并不在任何东西后面,但由于格式的原因,它必须在背景中。我不知道为什么显示错误。

您正在使用#iframe覆盖视频,因此无法滚动视频以查看控件。我刚刚把视频的z索引换成了2,把iframe换成了1。你只是错把录像带交给了div

iframe {
 position: absolute;
 z-index: 2;
 top: 0;
 left: 0;
 width: 100%;
 height: 100%;
 }
 #iframe {
     position: absolute;
     z-index: 1;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     overflow: auto;
}

这里是链接:

您是否有一个指向演示该问题的网页的链接?没有,很遗憾,该网站仍在开发中。我只能提供源代码,没关系。你能编辑你的文章并把源代码放在一个代码片段中吗?iframe元素中的内容是什么?那是很多代码。。。这里有一个指向粘贴箱的链接。好极了!就这样!非常感谢。很高兴我能帮忙。你介意把这个标记为已回答。
iframe {
 position: absolute;
 z-index: 2;
 top: 0;
 left: 0;
 width: 100%;
 height: 100%;
 }
 #iframe {
     position: absolute;
     z-index: 1;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     overflow: auto;
}