iframe标签height100%无效解决办法,亲测有效

iframe使用height属性之前要先保证body、html等父标签的height是100%
贴上页面完整代码

 <!DOCTYPE html>
    <html style="height: 100%">
      <head>
        <title>PxAllotIndex.html</title>
    	
        <meta name="keywords" content="keyword1,keyword2,keyword3">
        <meta name="description" content="this is my page">
        <meta name="content-type" content="text/html; charset=UTF-8">
        
      </head>
      <body style="height: 100%">
        <iframe id="ifram" width="40%"  frameborder="0" scrolling="auto" height="100%" src="PxWarehouseManage.html"></iframe>
        <iframe width="55%" frameborder="0"  scrolling="auto" src="PxWarehouseManage.html"></iframe>
      </body>
    </html>

猜你喜欢

转载自blog.csdn.net/Clarence_Pang/article/details/85262871