【问题标题】:align an iframe对齐 iframe
【发布时间】:2013-09-15 15:55:41
【问题描述】:

我有一个 html 页面,我想在页面底部对齐 iframe,使 iframe 占据所有宽度,我无法在底部对齐 iframe。请在底部找到 iframe 标签页面。

<html>
<body>

<p>The rest of the code has not been mentioned to reduce code overflow.</p>
<p>I want to align the iframe after a long page having no. of jquery , images etc.</p>

<iframe src ="bottom.html" width="100%" height="200" style="float:bottom" scrolling="no" frameborder="0">
<p>Your browser does not support iframes.</p>
</iframe>
</body>
</html>

【问题讨论】:

    标签: html css iframe


    【解决方案1】:
    <iframe src="bottom.html" style="position:absolute; bottom:0px; height:200px; width:100%;" scrolling="no" frameborder="0">
    

    对不起。试试吧。

    【讨论】:

    • 你用的是什么浏览器?当你说它不起作用时,究竟发生了什么?它是否移动了 iframe?
    • 我使用的是 firefox 和 Internet Explorer 8 ,但框架出现在两个浏览器的页面中间附近,而不是底部。所以我使用多个
      标签将它移到了底部,这是一种不好的做法,但它提供了所需的输出。所以想得到一些帮助来找到 thr
      标签的替代品。
    • 刚刚在 IE8 和 Firefox 3.5 中尝试过,都将 iframe 放在了底部。我用了这个&lt;iframe src="info.php" style="position:absolute; bottom:0px; height:200px; width:100%; border:1px solid #000000" scrolling="no" frameborder="0"&gt;&lt;/iframe&gt; 所以我可以看到一个边框。显然您没有 info.php 页面,因此您必须替换为 bottom.html 或您想要的任何页面。你可以发布bottom.html页面吗?上面的代码是您现在正在使用的代码还是缩短版本?
    • 另外,不确定它会在这里有所作为,但是您是否设置了文档类型? ` 渡//EN" "w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> w3.org/1999/xhtml"> 无标题文档 `
    • 查看下面的链接以获取实际页面,iframe 在底部。 pastebin.com/JqnXkCHw也请查看bottom.html页面来源:pastebin.com/L6QgM7TF
    【解决方案2】:

    使用顶部标签而不是底部标签。

    <iframe src="bottom.html" style="position:absolute; top:450px; height:200px; width:100%;" scrolling="no" frameborder="0">
    

    【讨论】:

      猜你喜欢
      • 2015-08-05
      • 1970-01-01
      • 1970-01-01
      • 2023-03-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-01-02
      相关资源
      最近更新 更多