CSS实现页面两列布局与三列布局的方法示例

2020-05-14 07:17:18易采站长站整理

  margin-left: -100px;   
  position: relative;   
  rightright: -110px;   
}  

下面再给出一个高度占满全屏的例子:

CSS Code复制内容到剪贴板

<p><!DOCTYPE html>     
<html xmlns="<a target="_blank" href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>">     
<head runat="server">     
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />     
    <title></title>     
    <style type="text/css">     
        body, html {     
            margin: 0px;     
        }     
        #header {     
            background: blue;     
            height: 100px;     
            width: 100%;     
            position: relative; /*父div的位置设置成相对的*/     
            top: 0;     
        }     
            #header #h_menu {     
                position:absolute;     
                bottombottom:0;     
                background:yellow;     
                width:100%;     
                height:50px;     
            }     
        #middle {