zoukankan      html  css  js  c++  java
  • [css layout][06] three percentage columns

    1.#wrapper宽度100%全部float向左

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

    2.#wrapper宽度100%全部float向右

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

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

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

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

     1 #wrapper {
     2   width: 50%;
     3   float: left;
     4   margin-right: -50%;
     5   position: relative;
     6   left: 50%;
     7 }
     8 #navigation {
     9   float: left;
    10   width: 25%;
    11   margin-right: -25%;
    12   position: relative;
    13   left: 25%;
    14 }
    15 #extra {
    16   float: left;
    17   width: 25%;
    18 }
    19 #footer {
    20   clear: both; 
    21 }
  • 相关阅读:
    Epoll技术深入学习
    nginx
    epoll案例
    Linux网络编程初步
    链表快速排序(已通过ACM在线评测)
    C++内存管理
    c++11并发语法初步
    数据库与SQL优化笔记(一)
    C++面向对象模型(虚表与虚表指针)
    c++的一些杂项
  • 原文地址:https://www.cnblogs.com/qiudeqing/p/3418437.html
Copyright © 2011-2022 走看看