简体   繁体   English

Google Chrome浏览器中的iframe高度

[英]Iframe Height in the Google Chrome

I have an iFrame inside my .aspx page that redirect to a external page, that are outside of my solution. 我的.aspx页中有一个iFrame,它可以重定向到解决方案之外的外部页。

The problem that I got is in the Google Chrome, the Height of the iFrame seems change the Height of the .aspx page. 我遇到的问题是在Google Chrome中,iFrame的高度似乎改变了.aspx页的高度。 This occurs just on the Google Chrome. 这仅发生在Google Chrome上。

<iframe runat="server" id="ifTest" name="ifTest" frameborder="0" height="790px"
width="960px" class="iframeTest" style="position:inherit;"></iframe>

The CSS class iframeTest is outside of my solution, how I said, my iframe show a page that are outside of my solution. 怎么说,CSS类iframeTest在我的解决方案之外。我的iframe显示了不在我的解决方案之外的页面。

For exemple, this is a sample of the iframe in the code-behind to show a page that are outside of my solution. 例如,这是代码中iframe的示例,以显示我的解决方案之外的页面。

this.ifTest.Attributes["src"] = "the_page_link_that_i_want";          

My problem is just the iframe Height in the Google Chrome, because the page in Google Chrome shows a big white space after the footer. 我的问题只是Google Chrome浏览器中的iframe高度,因为Google Chrome浏览器中的页面在页脚后显示了很大的空白。

Remove the px in the width and height attributes in the iframe. 在iframe中的widthheight属性中删除px

Eg 例如

<iframe runat="server" id="ifTest" name="ifTest" frameborder="0" height="790"
width="960" class="iframeTest" style="position:inherit;"></iframe>

AND/OR 与/或

add an extra style : 添加额外的样式:

iframe{ width:960px; height:790px;}

*Let me know if this helps, otherwise I can investigate more...is there some link I can have a look at? *让我知道这是否有帮助,否则我可以进行更多调查...是否可以查看一些链接? Or a JSfiddle link? 还是JSfiddle链接?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM