【问题标题】:i am using in my asp.net page and tried to set the iframe height 100%, But its does not work我在我的 asp.net 页面中使用并尝试将 iframe 高度设置为 100%,但它不起作用
【发布时间】:2011-02-28 18:59:13
【问题描述】:

我在我的 asp.net 页面中使用并尝试将 iframe 高度设置为 100%,但它不起作用。

【问题讨论】:

  • 请将无法正常工作的 aspx 复制到您的问题中。
  • 不,谢谢,我找到了解决方案及其工作......非常感谢
  • 请检查我的代码..我将其发布为答案

标签: asp.net html height


【解决方案1】:

它可能受其父级的高度限制。将所有祖先设置为 100%,如果您希望它是窗口的高度,包括 body 和 html 标签。

【讨论】:

  • 它无法正常工作,请在您的页面中尝试...我已更改所有其他父标签 style="height:100%"。
【解决方案2】:
<style type="text/css">
  html, body, div, iframe { margin:0; padding:0; height:100%; }
  iframe { display:block; width:100%; border:none; }
</style>

【讨论】:

    猜你喜欢
    • 2013-05-11
    • 1970-01-01
    • 2011-10-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多