我有一个标准的youtube嵌入了一个随机视频的iframe:
<iframe width="560" height="315"
src="https://www.youtube.com/embed/ixJ5NbvXg_A" frameborder="0"
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen></iframe>我重复了几次,得到一些滚动溢出。
<html>
<head></head>
<body>
<iframe width="560" height="315" src="https://www.youtube.com/embed/Mm2eYfj0SgA" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/Mm2eYfj0SgA" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/Mm2eYfj0SgA" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/Mm2eYfj0SgA" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/Mm2eYfj0SgA" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/Mm2eYfj0SgA" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe>
</body></html>当我在本地主机上使用django服务器提供此服务时,iframes将阻止页面滚动。
当您移动光标在视频上,然后使用鼠标轮滚动,它不工作。
真正有趣的是,当我粘贴相同的代码并将其保存到桌面上的本地文件时。然后用chrome打开它,滚动器可以在youtube视频上工作。
我签入了开发工具,所提供的文件具有完全相同的HTML。没有100%的CSS或Javascript服务,没有模板,什么都没有。这两种情况下都只有一个简单的html文件。
版本71.0.3578.98 (正式构建)(64位)
发布于 2019-02-04 09:44:25
我的特别问题是Chrome中的一个bug。如果我重新启动浏览器,它就会解决。
发布于 2019-01-10 18:38:01
发布于 2019-01-04 15:51:32
您可以尝试更改body的css,例如
body{
overflow: auto;
}https://stackoverflow.com/questions/53974357
复制相似问题