简体   繁体   English

IE11 - 滚动条闪烁

[英]IE11 - Scrollbar flickers

my web application has an and a SideNav (left) and horizontal Navigation on top.我的 web 应用程序在顶部有一个 SideNav(左)和水平导航。

The height of the is always based on the height of the loaded content.的高度始终基于加载内容的高度。 I have a "resizeMe" function for that.为此,我有一个“resizeMe”function。

But now I have the problem that the scroll bar flickers briefly when loading (of the iFrame) and then disappears again.但是现在我遇到的问题是滚动条在加载(iFrame)时会短暂闪烁,然后再次消失。 Is there a way to make the scrollbar disappear by default in IE11?有没有办法让滚动条在 IE11 中默认消失?

I have already tried the following attributes on the:我已经尝试了以下属性:

<iframe name="Source" 
        id="Source" 
        src="" 
        frameborder="0" 
        scrolling="" 
        style="height: 905px; overflow: hidden; -ms-overflow-style: none;" 
        onload="resizeMe()">
</iframe>

height is calculated计算高度

Thanks: :)谢谢: :)

I am having a site, which embeds another page,whose scrollbars are hidden and even do not show in IE 11(while loading).我有一个网站,它嵌入了另一个页面,其滚动条被隐藏,甚至不显示在 IE 11 中(加载时)。 And the codes, I have used in the embedded site are:我在嵌入式站点中使用的代码是:

  • scrollbar-width:none;
  • -ms-overflow-style:none; (You have used this, try the others) (你用过这个,试试其他的)
  • ::-webkit-scrollbar{width:0}

    You have used overflow:hidden;你已经使用了overflow:hidden; which not only hides the scrollbar but also disables scrolling, so using -ms-overflow-style:none;它不仅隐藏了滚动条,还禁用了滚动,因此使用-ms-overflow-style:none; would be useless if you want to disable scrolling as you have already used overflow:hidden;如果您想禁用滚动,那将是无用的,因为您已经使用了overflow:hidden; . . And the above codes hide the scroll-bar, but enables scrolling(unlike overflow:hidden; )上面的代码隐藏了滚动条,但启用了滚动(不像overflow:hidden;
    I would recommend you, that if you have embedded a site, which is owned by you, then try putting these codes in your embedded site.我建议您,如果您嵌入了一个属于您的网站,那么请尝试将这些代码放入您的嵌入式网站中。
    And I do not think that scrollbar style of iframe will be followed in major browsers according to this Stack Overflow answer .而且我不认为根据这个 Stack Overflow 答案,iframe 的滚动条样式会在主流浏览器中被遵循。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM