CSS:使iframe充满高度,没有滚动条 [英] CSS: Make iframe full with and height, no scrollbars
本文介绍了CSS:使iframe充满高度,没有滚动条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何在iframe上具有完整的高度,所以如果它超过指定的 height:500px;
,我没有滚动条-我只想拥有页面滚动条,而不要拥有iframe滚动条
How can I have full height on my iframe, so I dont have a scrollbar if it exceeds the specified height: 500px;
- I want to only have the page scrollbar existing and not the iframe scrollbar.
我知道您可以隐藏滚动条,但是您看不到iframe中的所有内容.
I know you can hide the scrollbar, but then you cannot see all the content in the iframe.
您如何做到这一点?
宽度:100%完美,但高度:100%不会.
width: 100% works perfectly, but height: 100% wont.
如果有效,则应该在iframe中显示整个网站
If it worked it should have shown the whole website in the iframe
推荐答案
让html的高度为100%
give html a height: 100%
html{ height: 100%; }
这篇关于CSS:使iframe充满高度,没有滚动条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文