Javascript 为什么iframe不隐藏其滚动条?

Javascript 为什么iframe不隐藏其滚动条?,javascript,css,html,iframe,Javascript,Css,Html,Iframe,谷歌Chrome或Chrome(最新/稳定版本) 当我有一个iframe和以下内容 <style> iframe{ overflow:hidden; } iframe::-webkit-scrollbar { display: none; } </style> <iframe src="images/tion.pdf#scrollbar=0&scrolling=0&page=1&zoom=50&scrollbar

谷歌Chrome或Chrome(最新/稳定版本)

当我有一个iframe和以下内容

<style>
iframe{
  overflow:hidden;
}
iframe::-webkit-scrollbar {
  display: none; 
}
</style>

 <iframe
  src="images/tion.pdf#scrollbar=0&scrolling=0&page=1&zoom=50&scrollbar=0&toolbar=0&navpanes=0" 
  width="410px" 
  height="570px" 
  id='myiframe' 
  style='border:none;' 
  scrolling="no"></iframe>

iframe{
溢出:隐藏;
}
iframe::-webkit滚动条{
显示:无;
}
当PDF文件包含超过1页时,似乎无法水平或垂直隐藏滚动条

我尝试了stackoverflow的所有相关答案,但没有一个能解决这个问题

但是,当我在OSX中与Google chrome、OSX或Linux上使用相同的代码时,它就工作了。当我使用Windows和Google chrome/chrome时,它不起作用


这是一个未知的遗漏错误,还是iframe是为windows设计的,当有PDF文件时,您无法删除滚动条?

尝试如下设置宽度和高度:

<iframe name="right_side" src="" width="50%" height="50%" ></iframe>


希望它能帮助你

在iframe中溢出的标记,将css{overflow:hidden}添加到该标记中。它可能会工作

overflow:hidden
添加到内部文档的样式中,而不是iframe
iframe::-webkit滚动条
这是一个有效的css选择器吗?是的-哇,谷歌真奇怪