HTML DIV充满整个屏幕

时间:2021-07-05 23:37:27
<!DOCTYPE html>
<html>
    <head>
        <title>A Little Game!</title>
        <meta charset="utf-8" />
        <style>
            html,body{
                height:100%;
                width: 100%;
                margin: 0;
                padding: 0;
            }
            #playground{
                background-color: blue;
                width: 100%;
                height: 100%;
                margin: 0;
                padding: 0;
            }
        </style>
    </head>
    <body>
        <div id="playground">fdsa</div>
    </body>
</html>