两栏自适应

这是一个关于网页布局的示例,展示了使用HTML和CSS创建包含header、article和footer的页面结构。页面采用了响应式设计,footer部分使用了flexbox布局,四个span元素分别设置了不同的背景颜色,代表不同的导航选项。
摘要由CSDN通过智能技术生成

<!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>Document</title>

    <style>

        * {

            margin: 0;

            padding: 0;

        }

        .wrap {

            height: 600px;

            /* border: 1px solid red; */

            margin: 50px auto;

        }

        .wrap header{

            height: 60px;

            background-color: #cccccc;

            text-align: center;

            line-height: 60px;

        }

        .wrap article{

            height: 465px;

            background-color: #ffc0cb;

            text-align: center;

            padding-top: 15px;

        }

        .wrap footer{

            display: flex;

            height: 60px;

            line-height: 60px;

            text-align: center;

           

        }

        .wrap span:nth-child(1){

            background-color: #ee82ee;

            flex: 1;

        }

        .wrap span:nth-child(2){

            background-color: #ffd700;

            flex: 1;

        }

        .wrap span:nth-child(3){

            background-color: #9acd32;

            flex: 1;

        }

        .wrap span:nth-child(4){

            background-color: #87ceeb;

            flex: 1;

        }

    </style>

</head>

<body>

    <div class="wrap">

        <header>header</header>

        <article>article</article>

        <footer>

            <span>首页</span>

            <span>关于我们</span>

            <span>联系我们</span>

            <span>联系我们</span>

        </footer>

    </div>

</body>

</html>

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值