我在一个jsf项目中,我所有的xhtml页面都显示在一个<iframe>
(参见下面的代码示例) .So中,我需要在这个iframe中隐藏HTML对象中的滚动。#myIframe html: scroll-x:hidden;
.I尝试了许多试验,但都没有效果。这是我的代码。
<iframe id="content" name="content"
style="width: 100%; height: 100%" src="content.xhtml" scrolling="no">
<p>Your browser does not support iframes.</p>
</iframe>
有一个scrolling="no"
的解决方案,但它也阻止了overflow-y
。我只想隐藏overflow-x
。
那么我的问题是,如何到达此iframe中的html对象,以及如何在此<html>
元素中隐藏overflow-x
?
发布于 2018-03-02 19:30:41
尝试以下操作:
<iframe id="content" name="content" style="width: 100%; height: 100%; overflow-x: hidden; overflow-y: scroll;" src="content.xhtml">
<p>Your browser does not support iframes.</p>
</iframe>
https://stackoverflow.com/questions/49067206
复制相似问题