zoukankan      html  css  js  c++  java
  • HTML5--混合布局

    1.先上效果图,大家来看看

    2.代码如下:

    <!doctype html>
    <meta charset='utf-8' content='text/html' />
    <head>
    <title>应用网页模板</title>
    <style content='text/css'>
    *  {
     margin:0px;
     padding:0px;
     -moz-box-sizing:border-box;
     -webkit-box-sizing:border-box;
     box-sizing:border-box;
     } 
    html,body  {
     width:100%;
     background:#fff;
       }  
    body {
     min-width:100%;
      }
    header,section,nav,article,aside,footer {
     display:block;
     text-align:center;
     text-shadow:1px 1px 1px #444;
     font-size:1.2em;
              }
    header {
     background-color:hsla(200,10%,20%,0.9);
     min-height:100px;
     min-width:100%;
     padding:10px 20px;
      }
    footer {
     background-color:hsla(250,50%,80%,0.9);
     min-width:100%;
     padding:1%;
     min-height:60px;
      }
    section {
     min-width:100%;
     min-height:800px;
      }
    section nav {
     background-color:hsla(300,60%,20%,.9);
     padding:1%;
     width:220px;
     }
    section article {
     background-color:hsla(120,50%,50%,.9);
     padding:1%;
      }
    section aside {
     background-color:hsla(20,80%,80%,.9);
     padding:1%;
     width:220px;
      } 
    body {
     display:flex;
     display:-ms-flex;
     -ms-flex-flow:column wrap;
     flex-flow:column wrap;
      }
    section {
     display:-ms-flex;
     display:flex;
     -ms-flex:1;
     flex:1;
     -ms-flex-flow:row wrap;
     flex-flow:row wrap;
     -ms-flex-align:stretch;
     align-items:stretch;
      }
    nav {
     flex:1;
     -ms-flex-order:0;
     order:0;
     }
    article {
     -ms-flex:1;
     flex:1;
     -ms-flex-order:2;
     order:2;
      }
    aside {
     flex:1;
     -ms-flex-order:3;
     order:3;
      } 
    </style>
     
    </head>
     
    <body>
    <header>页眉区域</header>
    <section>
     <article>1.主体内容区域</article>
        <nav>2.导航栏</nav>
        <aside>3.侧边栏</aside>
    </section>
    <footer>页脚区域</footer>
    </body>
  • 相关阅读:
    【转】CentOS8新特性
    【转】Python 库打包分发(setup.py 编写)简易指南
    【转】Python3的venv虚拟环境操作(Linux)
    【转】Qt绘图之QGraphicsScene QGraphicsView QGraphicsItem详解
    【转】Qt 积累
    webapi 参数传递详解
    WPF 字体图标样式
    asp net core mvc 跨域ajax解决方案
    NPOI导出Excel封装
    XML序列化CDATA
  • 原文地址:https://www.cnblogs.com/eilinge/p/9239780.html
Copyright © 2011-2022 走看看