gpt4 book ai didi

javascript - 如何在内容可滚动的情况下隐藏滚动条?

转载 作者:行者123 更新时间:2023-11-28 06:12:15 26 4
gpt4 key购买 nike

有一个 iframe,其中的内容是可滚动的,但是,由于 iframe 位于 body 内部,并且有两个垂直滑动条,我想隐藏 iframe 一个。

<iframe id="pillar_frame" src="/hongkong/pick_a_class/main" width="100%" height="100%" frameborder="0" scrolling="auto"></iframe> 

由于没有滚动条,我想:

  1. 可以通过鼠标滚轮滚动
  2. 可以在手机/平板电脑上滚动

如何使用 JS/Jquery 的东西隐藏栏,同时保持滚动功能?非常感谢

最佳答案

这是同一个问题的答案。

.foo {
width: 200px;
height: 200px;
overflow-y: hidden;
}
<iframe src="http://www.google.com" 
class="foo"
id="pillar_frame"
scrolling="no"
seamless="seamless">
</iframe>

关于javascript - 如何在内容可滚动的情况下隐藏滚动条?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36274113/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com