在这种特定情况下如何隐藏 ie8 中的滚动条?

发布于 2024-09-30 22:44:20 字数 249 浏览 0 评论 0原文

我试图让 IE 隐藏滚动条,推荐的食谱似乎不起作用:

例如 this.scrollbar='no'; <- 没有效果
this.style.overflow='隐藏'; <- 这会隐藏垂直滚动条并引入水平滚动条。
this.style.overflow-y='隐藏'; <-- 这会冻结 IE8。

我还能做什么?

发现.... this.style.overflowY='hidden';作品。

I am trying to make IE to hide a scrollbar, The recommended recipes do not seem to work:

E.g. this.scrollbar='no'; <- no effect
this.style.overflow='hidden'; <- this hides the vertical scrollbar and introduces a horizonal one.
this.style.overflow-y='hidden'; <-- this freezes IE8.

What else could i do?

Found out.... this.style.overflowY='hidden'; works.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

诺曦 2024-10-07 22:44:20

这应该有效:

document.body.scroll = "no";

这仅适用于 IE。

This should work:

document.body.scroll = "no";

This is strictly IE only.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文