<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>html盒子铺满全屏</title> </head> <style> *{ margin: 0; padding: 0; } .box{ position: absolute; 100%; height: 100%; background-color: #188eee; } </style> <body> <div class="box"></div> </body> </html>