其他分享
首页 > 其他分享> > 使盒子占满整个屏幕

使盒子占满整个屏幕

作者:互联网

<!DOCTYPE html> 
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>div高度占满整个屏幕</title>
  <style type="text/css">
    .main {
      padding: 0;
      margin: 0;
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      right: 0;
      background: red;
    }
  </style>
</head>
<div class="main">
</div>
</body>
</html>

 

标签:right,盒子,bottom,top,padding,整个,background,屏幕
来源: https://www.cnblogs.com/meiyanstar/p/13883870.html