Html 全屏模式下的控制div

Html 全屏模式下的控制div,html,Html,*全屏视图* 当我们处于全屏模式时,如何删除空白?与正常视图类似,如下所示: 存在白色间隙,因为您不能保证70px+76%+70px==100%。事实上,很有可能它没有,而你只是得到了这个76%值,因为你尝试了不同的数字,直到它合适为止 由于它们是绝对位置元素,请尝试使用bottom:70px而不是高度 <body style="margin: 0pt auto;"> <div id="header" style="background-color:#000033; widt

*全屏视图*

当我们处于全屏模式时,如何删除空白?与正常视图类似,如下所示:


存在白色间隙,因为您不能保证
70px+76%+70px==100%
。事实上,很有可能它没有,而你只是得到了这个
76%
值,因为你尝试了不同的数字,直到它合适为止

由于它们是绝对位置元素,请尝试使用
bottom:70px而不是高度

<body style="margin: 0pt auto;">
<div id="header" style="background-color:#000033; width:auto; height:70px"></div>
<div id="body" style="background-color: rgb(153, 153, 153); width: 100%; position: absolute; margin-right: 300px; margin-left: -300px; height: 76%;"></div>
<div id="nav" style="position: absolute; left: 1066px; width: 300px; top: 70px; height: 76%; background-color: rgb(221, 34, 221);"></div>
<div id="footer" style="background-color:#000033; width:100%; height:70px; position:absolute; bottom:0"></div>
</body>