国产探花免费观看_亚洲丰满少妇自慰呻吟_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 (www.survivalescaperooms.com)!

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

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 湖口县| 涪陵区| 文水县| 礼泉县| 延川县| 永靖县| 利川市| 图们市| 潼南县| 株洲县| 青龙| 阿拉善盟| 郓城县| 赤水市| 昆明市| 全州县| 剑河县| 眉山市| 茌平县| 辽中县| 淮安市| 白河县| 信阳市| 阿克苏市| 将乐县| 靖边县| 常州市| 阿克陶县| 伊通| 山阳县| 株洲县| 常德市| 万山特区| 金阳县| 云安县| 分宜县| 镇远县| 伊吾县| 长治县| 安仁县| 柘荣县|