html - 无法在 iframe 中隐藏滚动条?

标签 html css iframe

我在我的页面中嵌入了一个 iframe,其中包含来自另一个站点的内容。如果您想访问它,这里有一个链接 http://8mags.com/bored/wtf/wtf01.html 问题是我无法删除滚动条和其他一些东西。 我的 CSS 代码在这里

html {
overflow-x: auto !important;
overflow-y: auto !important;
}
body {
overflow-y: auto !important;
background: white !important;
}

问题是滚动条仍然存在。而且 iFrame 中的背景没有变为白色。我还尝试用这段代码隐藏一些细节

.quote-subtitle {
display: none !important;
}

但它也不起作用。

编辑

生成iFrame的代码就是这个

<span class="quora-content-embed" data-name="What-are-some-of-the-most-awesome-psychological-facts/answer/Arjun-Subramaniam/quote/2114886">Read <a data-width="541" data-height="893" class="quora-content-link" href="http://www.quora.com/What-are-some-of-the-most-awesome-psychological-facts/answer/Arjun-Subramaniam/quote/2114886" data-embed="nqjyswb" data-type="quote" data-id="2114886" data-key="78561af9adeb1d847ceae88107798254">Quote of Arjun Subramaniam's answer to What are some of the most awesome psychological facts?</a> on <a href="http://www.quora.com">Quora</a><script type="text/javascript" src="http://www.quora.com/widgets/content"></script></span>

最佳答案

<body class=" logged_out" style="overflow: hidden;">

我在链接上使用它并工作,并隐藏了滚动条。 或者使用它来访问 iframe 的内容

$('#iframe').contents().find('body').css('overflow','hidden');

关于html - 无法在 iframe 中隐藏滚动条?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27031564/

相关文章:

php - 密码从html到php然后是mysql

css - GWT setProperty 与 TransformOrigin

javascript - 无法让 jQuery 识别鼠标悬停在图像上

html - iFrame 最佳实践

node.js - 抓取视频的youtube混合播放列表ID

html - 如何为 CSS 类中的元素设置不同的标题规则

jquery - highcharts:Internet Explorer 忽略我的 div 容器的宽度

javascript - 为什么我的 <marquee> 中的 link/span 标签在 Firefox 中出现在多行上?

html - CSS - UI Kit 的背景图片

javascript - 查看器js仅显示index.html