Blogger Information
Blog 13
fans 1
comment 0
visits 8106
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
第六天弹性盒布局之弹性属性-第九期线上
云外
Original
609 people have browsed it

圣杯布局-弹性盒子

 TIM截图20191106174457.png

实例

实例
<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <title>圣杯布局-弹性盒子</title>

    <style>

    header,footer {

        height: 50px;

        background-color: green;


    }

    main {

        border: 1px black solid;

        box-sizing: border-box;

        overflow: auto;

        display: flex;

    }

     main > article {

         box-sizing: border-box;

         background-color: brown;

         flex: 1;

         min-height: 600px;

     }

     main > aside {

         box-sizing: border-box;

         min-height: 600px;

         width: 200px;

     }

      main > aside:first-of-type{

          background-color: blue;

          order: -1;

      }

       main > aside:last-of-type{

        background-color: olivedrab;

    }

    </style>

</head>

<body>

<header>头部</header>

<main>

    <article>内容区</article>

    <aside>左边</aside>

    <aside>右边</aside>

</main>

<footer>尾部</footer>

</body>

</html>

运行实例 »
点击 "运行实例" 按钮查看在线实例

手操代码

1.png2.png3.png4.png5.png6.png

 

 

Correction status:qualified

Teacher's comments:做不错, 参考色块有点太突兀了
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post