1. 程式人生 > >iframe標籤height100%無效解決辦法,親測有效

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>