亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

如何用CSS進行網頁布局

江老實 Web前端工程師
難度初級
時長22分
學習人數
綜合評分9.60
1991人評價 查看評價
9.8 內容實用
9.6 簡潔易懂
9.4 邏輯清晰
  • 1.清除浮動, clear:both; 2.為main設置高度, .main{ width:860px;height:600px;margin:0 auto;background:#9FC; }
    查看全部
    0 采集 收起 來源:實踐題

    2016-06-13

  • margin:由下至上移動 由右向左移動 由上至下移動 由左至右移動
    查看全部
    0 采集 收起 來源:編程練習

    2016-06-13

  • margin:top left down right
    查看全部
    0 采集 收起 來源:三列布局

    2016-06-13

  • 固定寬度布局 通過設置塊級元素中的 寬度比例/所占像素寬度 來控制
    查看全部
    0 采集 收起 來源:二列布局

    2016-06-13

  • 混合布局 <style type="text/css"> body{margin:0;padding:0;} .head{height:100px;width:800px;background:#393;margin:0 auto;} .top{height:100px;background:#3CF;} .main{width:800px;height:500px;background:#CCC;margin:0 auto;} .left{width:20%;height:500px;background:blue;float:left} .right{width:80%;height:500px;background:yellow;float:right} .sub_l{width:40%;background:#0F6;float:left;height:500px;} .sub_r{width:60%;background:orange;float:left;height:500px;} .bottom{height:100px;background:#C6C;margin:0 auto;width:800px} </style> </head> <body> <div class="top"> <div class="head"></div> </div> <div class="main"> <div class="left">200px</div> <div class="right"> <div class="sub_l"></div> <div class="sub_r"></div> </div> </div> <div class="bottom"></div> </body>
    查看全部
    0 采集 收起 來源:混合布局

    2018-03-22

  • <style type="text/css"> body{margin:0;padding:0;} .top{height:100px;background:#3CF;} .main{width:800px;height:500px;background:#CCC;margin:0 auto;} .left{width:20%;height:500px;background:blue;float:left} .right{width:80%;height:500px;background:yellow;float:right} .bottom{height:100px;background:#C6C;margin:0 auto;width:800px} </style> </head> <body> <div class="top"></div> <div class="main"> <div class="left">200px</div> <div class="right">300px</div> </div> <div class="bottom"></div>
    查看全部
    0 采集 收起 來源:混合布局

    2018-03-22

  • <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>三列布局</title> <style type="text/css"> body{ margin:0; padding:0; font-size:30px; font-weight:bold} div{ line-height:50px} .left{ width:200px; height:600px; background:#ccc; position:absolute; left:0; top:0} .main{ height:600px; margin:0 310px 0 210px; background:#9CF} .right{ height:600px; width:300px; position:absolute; top:0; right:0; background:#FCC;} </style> </head> <body> <div class="left">left</div> <div class="main">設計首頁的第一步是設計版面布局。就象傳統的報刊雜志編輯一樣,我們將網頁看作一張報紙,一本雜志來進行排版布局。 雖然動態網頁技術的發展使得我們開始趨向于學習場景編劇,但是固定的網頁版面設計基礎依然是必須學習和掌握的。它們的基本原理是共通的,你可以領會要點,舉一反三。</div> <div class="right">right</div> </body> </html>
    查看全部
    0 采集 收起 來源:編程練習

    2018-03-22

  • 一列布局: 單列布局,水平居中 margin:0 auto 0 auto,表示上下邊界為0,左右則根據寬度自適應相同值(即居中)
    查看全部
    0 采集 收起 來源:一列布局

    2016-06-12

  • margin:0 auto
    查看全部
    0 采集 收起 來源:一列布局

    2016-06-12

  • position:absolute;left:; position:absolute;right
    查看全部
    0 采集 收起 來源:三列布局

    2016-06-12

  • 版塊高度自適應
    查看全部
    0 采集 收起 來源:內容簡介

    2016-06-12

  • 自適應寬度
    查看全部
    0 采集 收起 來源:內容簡介

    2016-06-12

  • 三列布局不定寬:可以用浮動和百分比%; 三列布局頂寬 :需要用絕對定位position
    查看全部
    0 采集 收起 來源:三列布局

    2016-06-12

  • 固定寬度的兩列布局:首先要限制寬度; 二是設置寬度采用浮動float:left,float:right;
    查看全部
    0 采集 收起 來源:二列布局

    2016-06-12

  • 一列布局:margin:0 auto;
    查看全部
    0 采集 收起 來源:一列布局

    2016-06-12

舉報

0/150
提交
取消
課程須知
1.你需要掌握html+css樣式基礎知識 2.有一定的前端實際開發經驗
老師告訴你能學到什么?
1.掌握網頁布局的相關知識 2.能對不同的網頁進行布局結構劃分 3.掌握固定寬度和自適應寬度的實現方法

微信掃碼,參與3人拼團

微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號

友情提示:

您好,此課程屬于遷移課程,您已購買該課程,無需重復購買,感謝您對慕課網的支持!