相关疑难解决方法(0)

iframe会根据内容自动调整高度而不使用滚动条?

例如:

<iframe name="Stack" src="http://stackoverflow.com/" width="740"
        frameborder="0" scrolling="no" id="iframe"> ...
</iframe>
Run Code Online (Sandbox Code Playgroud)

我希望它能够根据其中的内容调整其高度,而不使用滚动.

html iframe height scrollbar

475
推荐指数
8
解决办法
102万
查看次数

包含嵌入/发布的Google文档的Iframe的自动高度

我有一个已发布的Google文档的iframe.该文档的内容可能会发生变化,因此我想根据内容自动调整iframe的高度.我找到了一些解决方案,但它们都需要访问子文档的头部.有没有人知道如何做到这一点?

您可以查看我在下面使用的代码的摘录:

#faq{
height: 800px;
overflow: hidden;
position: relative;
width: 660px;
border-top: 1px solid #90C547;
border-bottom: 1px solid #90C547;
}

<div id="faq"><iframe id="faqif" src="https://docs.google.com/document/..../pub?embedded=true" frameborder="0" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;height:900px;width:832px;position:absolute;top:-92px;left:-150px;right:0px;bottom:0px;z-index:0;" height="900px" width="832px"></iframe></div>
Run Code Online (Sandbox Code Playgroud)

html css iframe google-docs google-drive-realtime-api

15
推荐指数
2
解决办法
2万
查看次数