Open zhengwei1949 opened 6 years ago
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> <style> *{ margin:0; padding:0; } .content{ position: absolute; left:0; top:0; bottom:0; right:0; background:blue; } /* .content{ position: absolute; left:0; top:0; width:100%; height:100%; background:pink; } */ html,body{ height:100%; } .content{ width:100%; height:100%; background:pink; } </style> </head> <body> <div class="content"></div> </body> </html>