100%高度全屏自适应

it2022-05-05  126

<html xmlns=" http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>高度满屏</title>a <style type="text/css"> html,body{ height:100%;} body{ padding:0; margin:0;} #top{ height:96px; background-color:#CCC; color:#fff;} #autoHeight{ position:absolute; top:96px; right:0; left:0; bottom:0; height:expression((document.body.clientHeight - 96) + "px"); width:100%; background-color:#999; color:#fff;} </style> </head> <body> <div id="top">top</div> <div id="autoHeight">autoHeight</div> </body> </html>

转载于:https://www.cnblogs.com/vibratea/archive/2010/09/16/1827743.html


最新回复(0)