HTML DIV充满整个屏幕

<!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>

 

posted @ 2017-03-25 14:42  GoodByeZ  阅读(11415)  评论(0编辑  收藏  举报