炮叔 2015-03-12 08:27 采纳率: 0%
浏览 2076

chrome中frame用css固定高度失败

我用frame做了个网页,希望在改变浏览器窗口大小时里面的frame高度不改变。
我是这么做的:

<frameset cols="*,1024,*" frameborder="NO" framespacing="0" style="margin:0px auto; height:650px;">
<frame src="about:blank">
    <frameset rows="100,500,50" frameborder="NO" framespacing="0" style="height:650px;">
        <frame src="/_component/banner.html" noresize="noresize" scrolling="no" style="height:100px;">
        <frameset cols="224,800" frameborder="NO" framespacing="0" style="height:500px;">
            <frame src="/_component/sidebar.php" noresize="noresize" scrolling="no" name="sidebar">
            <frame src="/_component/index.php" name="showframe" noresize="noresize" scrolling="no">
        </frameset>
        <frame src="/_component/footer.php" noresize="noresize" scrolling="no" style="height:50px;">
    </frameset>
<frame src="about:blank">
</frameset>

测试时,IE做到了固定frame高度,但是chrome无法实现。
求大神,这是怎么了???有辙吗?谢谢!

  • 写回答

1条回答 默认 最新

  • danielinbiti 2015-03-12 09:09
    关注

    外面得包一层页面,把下面代码存成另一个页面。在iframe中src地址改成frame做的网页

     <body style="margin: 0px;height: 650px;width:100%">
           <iframe src="frameset所在的页面地址.html"
                  style="height:100%;width:100%;border-width: 0px;">
           </iframe>
    </body>
    
    评论

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!