html第一天div页面布局

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
    <title></title>
<style>
    #body{
        width:1002px;
    }
    #header{
        width:1002px;
        height:100px;
        background:blue;
    }
    #main{
        width:1002px;
        height:400px;
        background:red;
    }
    #lside{
        width:700px;
        height:400px;
        background: yellow;
        float:left;
    }
    #rside{
        width:302px;
        height:400px;
        background: pink;
        float:right;
    }    
    #footer{
        width:1002px;
        height:100px;
        background: grey;        
    }
    #lside .l_part1{
        width:280px;
        height:200px;
        background: purple;
        float:left;
    }
    #lside .l_part2{
        width:280px;
        height:200px;
        background: green;
        float:right;
    }    
    #lside .l_part3{
        clear:left;
        width:280px;
        height:200px;
        background: orange;
        float:left;
    }
     #lside .l_part4{
        width:280px;
        height:200px;
        background: red;
        float:right;
    }   
    #rside .r_part1{
        width:302px;
        height:190px;
        background:snow;
        float:left;

    }
    #rside .r_part2{
        clear:left;
        width:302px;
        height:187px;
        background:brown;         
    }
</style>
</head>
<body>

<div id = "body">
    <div id = "header">头部</div>
    <div id = "main">
        <div id = "lside">主体 左
            <div class = "l_part1">左上1</div>
            <div class = "l_part2">左上2</div>
            <div class = "l_part3">左下1</div>
            <div class = "l_part4">左下2</div>
        </div>
        <div id = "rside">主体 右
            <div class = "r_part1">右上</div>
            <div class = "r_part2">右下</div>
        </div>
    </div>
    <div id = "footer">脚部</div>
</div>

</body>
</html>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值