Safari / Chrome(Webkit) - 无法隐藏iframe垂直滚动条 [英] Safari/Chrome (Webkit) - Cannot hide iframe vertical scrollbar

查看:183
本文介绍了Safari / Chrome(Webkit) - 无法隐藏iframe垂直滚动条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在www.example.com上有一个 iframe ,指向support.example.com(这是一个外部域的CNAME)。

I have an iframe on www.example.com that points to support.example.com (which is a CNAME to a foreign domain).

我自动调整了我的iframe的高度,使框架不需要任何滚动条来显示包含的网页。

I automatically resize the height of my iframe so that the frame will not need any scrollbars to display the contained webpage.

在Firefox和IE这个工作伟大,没有滚动条,因为我使用< iframe ... scrolling =no>< / iframe> 。但是,在webkit浏览器(Safari和Chrome)上,即使没有滚动条的页面有足够的空间,垂直滚动条仍然存在(滚动条显示为灰色)。

On Firefox and IE this works great, there is no scrollbar since I use <iframe ... scrolling="no"></iframe>. However, on webkit browsers (Safari and Chrome), the vertical scrollbar persists even when there is sufficient room for the page without the scrollbar (the scrollbar is grayed out).

如何隐藏webkit浏览器的滚动条?

How do I hide the scrollbar for webkit browsers?

推荐答案

我刚刚遇到这个问题,发现修复是设置 iframe 中的页面的HTML标记上的 overflow:hidden

I just ran into this problem, and discovered that the fix was to set overflow: hidden on the HTML tag of the page inside the iframe.

这篇关于Safari / Chrome(Webkit) - 无法隐藏iframe垂直滚动条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆