zoukankan      html  css  js  c++  java
  • 两边固定中间子适应的流式布局

    两边固定中间自适应的布局

    Html:

    <div id="main">
        <div id="left">
        </div>
        <div id="right">
        </div>
        <div id="mid">
        </div>
    </div>
    

      

    CSS:

    <style type="text/css">
        body
        {
            margin: 0px;
        }
            
        #main
        {
            background-color: #006699; 
            height: 500px;
        }
            
        /* 左列,默认的宽度是200 Pixel */
        #left
        {
            float: left;
            width: 200px;
            height: 300px;
            background-color: #33CC33;
            z-index: 3;
        }
            
        /* 右列,默认的宽度是200 Pixel */
        #right
        {
            float: right;
            width: 200px;
            height: 300px;
            background-color: #999999;
            z-index: 5;
        }
            
        /* 居中自适应 */
        #mid
        {
            width: auto;
            height: 300px;
            margin: 0 210px;
            background-color: #999900;
            z-index: 1;
        }
    </style>

    整体效果:

  • 相关阅读:
    Shell 字符串
    shell 使用变量
    shell 数组
    shell 注释
    shell 输出双引号
    shell wc命令 统计行数
    shell :
    shell 函数调用
    pyqt 调用颜色选择器
    Navicat+Premium+12+破解补丁
  • 原文地址:https://www.cnblogs.com/fanyong/p/2645066.html
Copyright © 2011-2022 走看看