婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 知識庫 > html5 div布局與table布局詳解

html5 div布局與table布局詳解

熱門標簽:貸款電銷人工和機器人哪個好 杭州營銷電銷機器人供應商 百應電銷機器人產業 電視購物電銷外呼系統 聯通400電話申請 高德地圖標注賓館位置 飛亞外呼系統 西寧智能外呼系統加盟 電話機器人如何

本文實例為大家解析了html5 div布局與table布局,供大家參考,具體內容如下

div布局:html+css實現簡單布局。

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

<!DOCTYPE html>  
<html>  
<head lang="en">  
    <meta charset="UTF-8">  
    <title>div布局</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>  
    <div id="container">  
        <div id="heading">頭部</div>  
        <div id="content-menu">內容菜單</div>  
        <div id="content-body">內容主體</div>  
        <div id="footer">底部</div>  
    </div>  
</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布局詳解》,本文關鍵詞  html5,div,布局,與,table,詳解,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《html5 div布局與table布局詳解》相關的同類信息!
  • 本頁收集關于html5 div布局與table布局詳解的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 瑞金市| 和政县| 雅安市| 三亚市| 隆林| 上思县| 华安县| 大足县| 永兴县| 托里县| 家居| 荥经县| 伊宁县| 松阳县| 浦江县| 柏乡县| 东阿县| 施甸县| 托里县| 临高县| 洪洞县| 壶关县| 威海市| 遂溪县| 灵武市| 大同市| 大名县| 仙游县| 五常市| 大连市| 赣榆县| 元氏县| 吉安县| 新密市| 苍南县| 东兴市| 乐东| 康乐县| 新田县| 张家界市| 咸宁市|