有时页面需要获得用户浏览器的高度才能确定内容显示在哪里,代码
<div style="position:absolute; left:0; top:expression(document.body.clientHeight/2-document.body.clientHeight/4)">
</div>
中,expression(document.body.clientHeight/2)即为获得浏览器高度再除以2
有时页面需要获得用户浏览器的高度才能确定内容显示在哪里,代码
<div style="position:absolute; left:0; top:expression(document.body.clientHeight/2-document.body.clientHeight/4)">
</div>
中,expression(document.body.clientHeight/2)即为获得浏览器高度再除以2