校园春色亚洲色图_亚洲视频分类_中文字幕精品一区二区精品_麻豆一区区三区四区产品精品蜜桃

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

html5 div布局與table布局詳解

熱門標(biāo)簽:貸款電銷人工和機器人哪個好 杭州營銷電銷機器人供應(yīng)商 百應(yīng)電銷機器人產(chǎn)業(yè) 電視購物電銷外呼系統(tǒng) 聯(lián)通400電話申請 高德地圖標(biāo)注賓館位置 飛亞外呼系統(tǒng) 西寧智能外呼系統(tǒng)加盟 電話機器人如何

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

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

#container中height不能寫成百分?jǐn)?shù),必須為具體高度。

<!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">內(nèi)容菜單</div>  
        <div id="content-body">內(nèi)容主體</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">內(nèi)容</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>  

效果圖:

以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

標(biāo)簽:玉溪 內(nèi)蒙古 邯鄲 安慶 煙臺 晉中 撫州 牡丹江

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《html5 div布局與table布局詳解》,本文關(guān)鍵詞  html5,div,布局,與,table,詳解,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《html5 div布局與table布局詳解》相關(guān)的同類信息!
  • 本頁收集關(guān)于html5 div布局與table布局詳解的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    主站蜘蛛池模板: 司法| 南开区| 雅江县| 林芝县| 永胜县| 连云港市| 临武县| 广汉市| 沙雅县| 大荔县| 灵寿县| 射洪县| 巫山县| 延川县| 罗平县| 永靖县| 墨玉县| 乳山市| 永泰县| 北票市| 宜宾市| 武川县| 察雅县| 台山市| 松江区| 皋兰县| 宁津县| 玛曲县| 彭水| 平陆县| 郁南县| 临泽县| 海安县| 廉江市| 江安县| 南靖县| 茌平县| 阜城县| 山西省| 清远市| 巴东县|