直接上style:
<style>
html{height:100%}
body{height:calc(100% - 16px); /* 16px为body的缺省上下margin,可根据实际调整 */}
</style>
然后是body:
<body>
<div style="height:100%;border:1px solid red">
..."border:1px solid red"只是为了方便观察
</div>
</body>