为什么 iframeing yahoo.com 可以没有滚动条,但 iframeing google.com 会有滚动条?

发布于 2024-09-30 14:03:42 字数 432 浏览 11 评论 0原文

代码是

<iframe scrolling="no" src="http://www.google.com" width="200" height="100"></iframe>hello

没有办法摆脱滚动条吗? (应该在所有 IE 7、8、FF、Chrome、Safari 中工作)

如果它是 iframes yahoo.com,那么它就可以工作...

示例:
http://jsfiddle.net/tEXmL/1/
http://jsfiddle.net/tEXmL/2/

the code is

<iframe scrolling="no" src="http://www.google.com" width="200" height="100"></iframe>hello

there is no way to get rid of the scrollbar? (should work in all IE 7, 8, FF, Chrome, Safari)

If it iframes yahoo.com, then it works...

sample:
http://jsfiddle.net/tEXmL/1/
http://jsfiddle.net/tEXmL/2/

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

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

发布评论

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

评论(2

橘虞初梦 2024-10-07 14:03:42

可能是因为 Google 在其 CSS 中明确设置了 overflow-y:scroll 而 Yahoo 没有。

Could be because Google explicitly sets overflow-y: scroll in their CSS whereas Yahoo does not.

夜还是长夜 2024-10-07 14:03:42

您可以使用 iframe 的无缝属性。

You can use seamless attribute of iframe.

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