DIV布局
1.一般页面可简单分为上中下结构,上为头部,中为内容部分,下为脚部
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>DIV基本布局</title>
</head>
<body>
    <div class="header"></div>
    <div class="content"></div>
    <div class="footer"></div>
</body>
</html>
2.示例:按图写DIV布局

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>DivLayout</title> <style type="text/css"> .header{ height: 100px; background-color: red; } .nav{ height: 50px; background-color: green; } .article{ height: 400px; display: inline-block; width: 34%; background-color: blue; } .aside{ height: 400px; display: inline-block; width: 65%; background-color: crimson; } .footer{ height: 100px; background-color: deeppink; } </style> </head> <body> <div class="header"><header></div> <div class="nav"><nav></div> <div class="content"> <div class="article"><article></div> <div class="aside"><aside></div> </div> <div class="footer"><footer></div> </body> </html>
                    
                
                
            
        
浙公网安备 33010602011771号