国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > HTML > 正文

html5 div布局與table布局詳解

2020-03-24 18:15:38
字體:
來源:轉載
供稿:網(wǎng)友
本文實例為大家解析了html5 p布局與table布局,供大家參考,具體內容如下

p布局:html+css實現(xiàn)簡單布局。

#container中height不能寫成百分數(shù),必須為具體高度。

<!DOCTYPE html>  <html>  <head lang="en">      <meta charset="UTF-8">      <title>p布局</title>      <style type="text/css">          body{              margin:0;              padding:0;          }          #container{              width:100%;              height:650px;              background-color: aqua;          }          #heading{              width:100%;              height:10%;              background-color: azure;          }          #content-menu{              width:30%;              height:80%;              background-color: chartreuse;              float:left;          }          #content-body{              width:70%;              height:80%;              background-color: chocolate;              float:left;          }          #footer{              width:100%;              height:10%;              background-color: darkgrey;              clear: both;          }      </style>  </head>  <body>      <p id="container">          <p id="heading">頭部</p>          <p id="content-menu">內容菜單</p>          <p id="content-body">內容主體</p>          <p id="footer">底部</p>      </p>  </body>  </html>



效果圖:



table布局:

<!DOCTYPE html>  <html>  <head lang="en">      <meta charset="UTF-8">      <title>table布局</title>  </head>  <body marginwidth="0px" marginheight="0px">      <table width="100%" height="650px" style="background-color: aqua">          <tr>              <td colspan="3" width="100%" height="10%" style="background-color: chartreuse">這是頭部</td>          </tr>          <tr>              <td width="20%" height="80%" style="background-color: antiquewhite">左菜單</td>              <td width="60%" height="80%" style="background-color: coral">內容</td>              <td width="20%" height="80%" style="background-color: cornflowerblue">右菜單</td>          </tr>          <tr>              <td colspan="3" width="100%" height="10%" style="background-color: crimson">這是底部</td>          </tr>      </table>  </body>  </html>



效果圖:



以上就是html5 div布局與table布局詳解 的內容,更多相關內容請關注PHP (m.survivalescaperooms.com)!

鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯(lián)系我們修改或刪除,多謝。

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 临澧县| 互助| 岐山县| 娱乐| 新绛县| 铁岭县| 保定市| 松江区| 保定市| 新建县| 疏勒县| 扶风县| 巩留县| 淮北市| 湛江市| 佛教| 南城县| 新龙县| 泊头市| 棋牌| 景东| 靖边县| 雅安市| 灵寿县| 满城县| 汉寿县| 杭锦旗| 南宫市| 苍溪县| 内乡县| 保德县| 云霄县| 阿图什市| 马公市| 忻城县| 天水市| 德惠市| 五指山市| 江门市| 根河市| 襄樊市|