p布局
 !DOCTYPE html  html  head lang= en  meta charset= utf-8  title /title  style body{margin: 0; padding: 0;}#header{width:100%; height: 90px; background: #b19f9d; }#nav{margin: 0 auto; width:70%; height: 90px; background: #fcf;}.content{width: 950px; height: 900px; background: #847369; margin: 0 auto;}.left{width:30%; height: 900px; background: #decfd4; float: left;}.right{width: 70%; height: 900px; background: #b3a19d; float: left;}footer{width:100%; height: 150px; background: #a8817a;} /style  /head  body  header id= header  nav id= nav 空空 /nav  /header  p >2.div布局
 !DOCTYPE html  html  head lang= en  meta charset= utf-8  title /title  style  body{margin: 0; padding: 0;}  #header{width:100%; height: 90px; background: #b19f9d; }  #nav{margin: 0 auto; width:70%; height: 90px; background: #fcf;}  .content{width: 950px; height: 900px; background: #847369; margin: 0 auto;}  .left{width:30%; height: 900px; background: #decfd4; float: left;}  .right{width: 70%; height: 900px; background: #b3a19d; float: left;}  footer{width:100%; height: 150px; background: #a8817a;}  /style  /head  body  header id= header  nav id= nav 空空 /nav  /header  div >3.table布局
 !DOCTYPE html  html  head lang= en  meta charset= utf-8  title /title  style  /style  /head  body marginheight= 0px marginwidth= 0px  table width= 100% height= 950px > !DOCTYPE html  html  head lang= en  meta charset= utf-8  title /title  style  body{ margin: 0 auto; table{ width: 100%; height: 950px; background: gray; } #header{ width: 100%; height: 10%; background: aqua; } #content{ width: 100%; height: 80%; background: blue; }/**如果這里的父元素定了高度,子元素就不要定高度,然后table標簽的屬性在樣式里面是不通用**/ .content_left{ width: 30%; background: #f60; } .content_right{ width: 70%; background: #fcc; } #footer{ width: 100%; height: 10%; background: aqua; } /style  /head  body  table cellspacing= 0 cellpadding= 0 border= 0  tr id= header  td colspan= 2 td  /tr  tr id= content  td > 相關推薦:
問題:關于一個壇友的html布局實現_html/css_WEB-ITnose
HTML布局之計算器(div+css)_html/css_WEB-ITnose
,html布局的問題。_html/css_WEB-ITnose
鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。
      
新聞熱點
疑難解答