CSS开发-简单布局模板

实现图如下:

代码如下:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>简单布局</title>
    <style>
        body{
            background-color: #f4f4f4;
        }
        .header{
            width:1920px;
            height:171px;
            background-color: #fff;
            margin:0 auto;
        }
        main{
            width:1190px;
            height:470px;
            margin:10px auto 30px;
            background-color: #f5f5f5;
        }
        footer{
            width:1190px;
            height:260px;
            margin:0px auto;
            background-color: red;
        }
        .header-top{
            width:100%;
            height:31px;
            background-color: #e3e4e5;
        }
        .header-content{
            width: 100%;
            height: 140px;
            background-color: #ffffff;
        }
        nav,article,aside,.article-image,.article-discount{
            height: 100%;
            float:left;
        }
        nav{
            width: 190px;
            background-color: #fefefe;
        }
        article{
            width: 790px;
            background-color: #f5f5f5;
            margin:0px 10px;
        }
        aside{
            width:190px;
            background-color:#ffffff;
        }
        article>div.article-image{
            width:590px;
            background-color:yellow;
        }
        article>div.article-discount{
            width:190px;
            background-color: #f6f6f6;
            margin-left:10px;
        }
        article div.article-discount-01{
            width: 100%;
            height:150px;
            background-color:#cedbdd;
        }
        article div.article-discount-02{
            width: 100%;
            height: 150px;
            background-color: #ceddd5;
            margin:10px 0px;
        }
        article div.article-discount-03{
            width:100%;
            height:150px;
            background-color:#d7d9e4;
        }
    </style>
</head>
<body>
    <!-- 网页头部 -->
    <div class="header">
        <div class="header-top"></div>
        <div class="header-content"></div>
    </div>

    <!-- 网页主体 -->
    <main>
        <!-- <div class="div-nav"></div>
        <div class="div-"></div>
        <div class="div-"></div>
        <div class="div-"></div> -->
        <!-- 左导航 -->
        <nav></nav>
        <!-- 主体 -->
        <article>
            <div class="article-image"></div>
            <div class="article-discount">
                <div class="article-discount-01"></div>
                <div class="article-discount-02"></div>
                <div class="article-discount-03"></div>
            </div>
        </article>
        <!-- 右边栏 -->
        <aside></aside>
    </main>

    <!-- 网页底部 -->
    <footer>
        
    </footer>
</body>
</html>

  • 2
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值