zoukankan      html  css  js  c++  java
  • css实现div的高度填满剩余空间

    css实现div的高度填满剩余空间

    方式1:绝对定位

    .top{
    100%;
    height: 70px;
    }

    .bottom{
    background-color: #cc85d9;
    100%;
    position: absolute;
    top: 70px;
    bottom: 0px;
    left: 0px;
    }

     方式2:border-sizing

    html,
    body {
    height: 100%;
    padding: 0;
    margin: 0;
    }

    .container {
    height: 100%;
    padding: 70px 0 0;
    box-sizing: border-box;
    }

    .bottom {
    height: 100%;
    background: #fd9740;
    }

    .top {
    height: 70px;
    margin: -70px 0 0;
    background: #61e1f6;

    100%;
    }


    或者

    .top {
    height: 70px;

    position: absolute;

    top: 0;
    left: 0;

    background: #61e1f6;

    100%;
    }

  • 相关阅读:
    Ajax技术
    java web中filter分析
    Async分析
    解释session
    XML相关知识
    开学第一课
    svn
    spa单页面应用(angular)
    angular
    webpack认识
  • 原文地址:https://www.cnblogs.com/youngMe/p/5806925.html
Copyright © 2011-2022 走看看