• [css layout][04] three percentage columns


    1.我猜作者肯定这样弄的

     1 #wrapper {
     2   width: 100%;
     3   float: left;
     4 }
     5 #content {
     6   margin-right: 50%;
     7 }
     8 #navigation {
     9   float: left;
    10   width: 25%;
    11   margin-left: -25%;
    12 }
    13 #extra {
    14   float: left;
    15   width: 25%;
    16   margin-left: -50%;
    17 }
    18 #footer {
    19   clear: both;
    20 }

    果然..

    2.float向右

     1 #wrapper {
     2   width: 100%;
     3   float: right;
     4 }
     5 #content {
     6   margin-right: 50%;
     7 }
     8 #navigation {
     9   float: right;
    10   width: 25%;
    11   margin-right: -100%;
    12 }
    13 #extra {
    14   float: right;
    15   width: 25%;
    16   margin-right: -75%;
    17 }
    18 #footer {
    19   clear: both;
    20 }

    3.#wrapper宽度50%,全部左浮动

     1 #wrapper {
     2   width: 50%;
     3   float: left;
     4 }
     5 #navigation {
     6   float: left;
     7   width: 25%;
     8   margin-right: -25%;
     9   position: relative;
    10   left: 25%;
    11 }
    12 #extra {
    13   float: left;
    14   width: 25%;
    15 }
    16 #footer {
    17   clear: both;
    18 }

    4.#wrapper宽度50%全部float向右

     1 #wrapper {
     2   width: 50%;
     3   float: right;
     4   margin-left: -50%;
     5   position: relative;
     6   left: -50%;
     7 }
     8 #navigation {
     9   float: right;
    10   width: 25%;
    11 }
    12 #extra {
    13   float: right;
    14   width: 25%;
    15 }
    16 #footer {
    17   clear: both;
    18 }
  • 相关阅读:
    判断二叉树是否是完全二叉树
    二叉搜索树的第k个节点
    二叉树的深度
    二叉搜索树与双向链表
    二叉搜索树的后序遍历序列
    poj 2192 (DP)
    poj 1159 (DP LCS)
    poj 1934(LCS)
    《编程之美》读书笔记 -- 1.2中国象棋问题
    poj 1050(DP)
  • 原文地址:https://www.cnblogs.com/qiudeqing/p/3416284.html
Copyright © 2020-2023  润新知