zoukankan      html  css  js  c++  java
  • 布局问题: ( 头部,底部固定,并且头部吸顶,底部吸底,中间自适应(内容多可以scroll))

     1 <!DOCTYPE html>
     2 <html lang="en">
     3 <head>
     4   <meta charset="UTF-8">
     5   <meta name="viewport" content="width=device-width, initial-scale=1.0">
     6   <meta http-equiv="X-UA-Compatible" content="ie=edge">
     7   <title>Document</title>
     8   <style>
     9     html,body,ul,li,p{
    10       margin: 0;
    11       padding: 0;
    12     }
    13     html,body{
    14       height: 100%;
    15       display: flex;
    16       flex-direction: column;
    17     }
    18     .header,.footer{
    19       height: 100px;
    20       background-color: #3a9;
    21     }
    22     .body{
    23       /* flex: 1; */
    24       flex-grow:1;
    25       flex-shrink:1;
    26       flex-basis: 0;
    27       overflow: scroll;
    28       background-color:yellow;
    29     }
    30     .test1{
    31       height: 300px;
    32     }
    33     .test2{
    34       height: 300px;
    35       background-color: coral;
    36     }
    37     .test3{
    38       height: 300px;
    39       background-color: green;
    40     }
    41   </style>
    42 </head>
    43 <body>
    44   <div class="header"></div>
    45   <div class="body">
    46     <div class="test1">1</div>
    47     <div class="test2">2</div>
    48     <div class="test3">3</div>
    49   </div>
    50   <div class="footer"></div>
    51 </body>
    52 </html>
  • 相关阅读:
    sourceTree和eclipse 的使用
    oracle习题练习
    oracle详解
    单例模式
    反射详解
    Oracle 存储过程判断语句正确写法和时间查询方法
    MVC4 Jqgrid设计与实现
    遇到不支持的 Oracle 数据类型 USERDEFINED
    ArcGIS Server10.1 动态图层服务
    VS2010连接Oracle配置
  • 原文地址:https://www.cnblogs.com/gaoxuerong123/p/10564209.html
Copyright © 2011-2022 走看看