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

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

企業網站綜合布局實戰

zkpplpp PHP開發工程師
難度初級
時長 2小時55分
學習人數
綜合評分9.73
544人評價 查看評價
9.8 內容實用
9.8 簡潔易懂
9.6 邏輯清晰
  • body,p,ul{margin:?0;padding:?0}
    /*在此定義相關CSS樣式*/
    .topList{
    ????width:300px;
    ????height:180px;
    ????border:?1px?solid?#E8E8E8;
    ????margin:?0?auto;
    }
    ul?{list-style:?none;}
    
    .topList?p{
    ????float:?left;
    ????height:16px;
    ????margin-top:?4px;
    ????font-size:12px;
    ????line-height:16px;
    }
    
    .topList?li?{
    ????overflow:?hidden;
    ????margin:?5px?0;
    }
    
    .topList?em?{
    ????width:20px;
    ????height:16px;
    ????margin:?4px?4px;
    ????font-size:12px;
    ????text-align:center;
    ????line-height:16px;
    ????display:block;
    ????float:left;
    ????background-image:url("http://img1.sycdn.imooc.com//53cf0fa20001d3dc00200032.jpg");
    ????background-position:?bottom;
    }
    
    .top?>?em?{
    ????background-image:url("http://img1.sycdn.imooc.com//53cf0fa20001d3dc00200032.jpg");
    ????background-position:?top;
    ????color:#FFF;
    }
    .topList?a?{
    ????text-decoration:none;
    ????color:?#000;
    }


    查看全部
    0 采集 收起 來源:編程練習

    2020-01-20

  • <style type="text/css">


    /*在此定義相應的類選擇器,并根據要求設置相關CSS屬性*/

    .mainBox{

    ? ?width:960px;

    ? ?background-color:#CFF;

    ? ?float:left;

    }

    .leftBox{

    ? ? width:740px;

    ? ? height:300px;

    ? ? background-color:#C9F;

    ? ? float:left;

    }

    .rightBox{

    ? ? width:210px;

    ? ? height:300px;

    ? ? background-color:#FCF;

    ? ? float:right;

    }


    </style>

    </head>


    <body>



    <!--在此添加相應的div標簽-->

    <div class="mainBox">

    ? ??

    ? ? <div class="leftBox"></div>

    ? ? <div class="rightBox"></div>

    </div>



    </body>


    查看全部
    0 采集 收起 來源:編程練習

    2019-11-05

  • Myfocus教程的相關網址:http://demo.jb51.net/js/myfocus/tutorials.html

    查看全部
  • 由于a標簽屬于內聯元素,
    無高度和寬度屬性,
    因此控制鼠標經過狀態改變背景顏色時,
    僅在有文字的地方顯示背景顏色。
    解決的辦法是把a標簽變為塊級元素,
    display:block


    查看全部
    0 采集 收起 來源:編程練習

    2019-10-25

  • http://img1.sycdn.imooc.com//5db1a47d0001ee9718831013.jpg錯位

    解決辦法:.nav{}中加入 clear:both;

    原理???

    查看全部
  • 兩個盒子在一排?

    查看全部
    0 采集 收起 來源:盒子模型

    2019-10-24

  • list-style-type可以設置列表項目符號為:none無項目符號,disc實心圓,circle空心圓,square實心方塊等但是不可以設置圖片為項目符號。

    查看全部
    0 采集 收起 來源:練習題

    2019-10-22

  • clear規定元素的哪一側不允許其他浮動元素

    查看全部
    0 采集 收起 來源:浮動 float

    2019-10-08

  • (⊙o⊙)…

    查看全部
    0 采集 收起 來源:編程練習

    2019-09-19

  • <style?type="text/css">


    ????????/*在此定義相關CSS樣式*/

    ????????*{margin:0;padding:0;}

    ????????.topList{

    ????????????padding:5px;

    ????????????width:300px;

    ????????????height:180px;

    ????????????border:1px?solid?#E8E8E8;

    ????????????margin:0?auto;

    ????????}

    ????????.topList?li{

    ????????????list-style-type:none;

    ????????????margin-bottom:15px;

    ???????????

    ????????}

    ????????.topList?.top?em{

    ????????????vertical-align:middle;

    ????????????float:left;

    ????????????font-style:normal;

    ????????????width:20px;

    ????????????height:16px;

    ????????????text-align:center;

    ????????????color:#333;

    ????????????background-image:url("?http://img1.sycdn.imooc.com//53cf0fa20001d3dc00200032.jpg");

    ????????????background-repeat:no-repeat;

    ????????????background-position:0?0;

    ????????}

    ????????.topList?li?em{

    ????????????float:left;

    ????????????font-style:normal;

    ????????????width:20px;

    ????????????height:16px;

    ????????????text-align:center;

    ????????????color:#333;

    ????????????background-image:url("?http://img1.sycdn.imooc.com//53cf0fa20001d3dc00200032.jpg");

    ????????????background-repeat:no-repeat;

    ????????????background-position:0?-16px;

    ????????}

    ????????.topList?li?p?a{

    ????????????

    ????????????text-decoration:none;

    ????????????color:black;

    ????????????font-size:12px;

    ????????}

    ????????.topList?li?p{

    ???????????line-height:16px;

    ????????????

    ????????}

    ??????

    ????????

    ????????

    ????????

    ????????

    ????????</style>

    ????????</head>

    ????????

    ????????<body>

    ????????<div?class="topList">

    ????????<ul>

    ????????<li?class="top"><em>01</em>

    ????????<p><a?href="http://www.xianlaiwan.cn/"?>【慕客訪談用戶篇】“有為屌絲”在路上</a></p>

    ????????</li>

    ????????<li?class="top"><em>02</em>

    ????????<p><a?href="http://www.xianlaiwan.cn/">【有獎活動】給父親的三行書信</a></p>

    ????????</li>

    ????????<li?class="top"><em>03</em>

    ????????<p><a?href="http://www.xianlaiwan.cn/">《程序猿,請曬出你的童年》活動獲獎公告</a></p>

    ????????</li>

    ????????<li?><em>04</em>

    ????????<p><a?href="http://www.xianlaiwan.cn/">【慕課訪談】破繭成蝶——美女程序員的蛻變史</a></p>

    ????????</li>

    ????????<li?><em>05</em>

    ????????<p><a?href="http://www.xianlaiwan.cn/">【獲獎公告】追“球”巔峰,爭當“預言帝”</a></p>

    ????????</li>

    ????????<li?><em>06</em>

    ????????<p><a?href="http://www.xianlaiwan.cn/">【問卷調查】慕課網用戶學習情況大調查</a></p>

    ????????</li>

    ????????</ul>

    ????????</div>

    ????</body>


    查看全部
    0 采集 收起 來源:編程練習

    2019-09-16

  • 圖片高為32px

    background-position:寬 高,

    若只設置寬,則高為50%,

    background-position:0 16px,使圖片移動16px至白色圖片完全顯示

    查看全部
    0 采集 收起 來源:編程練習

    2019-09-15

  • <!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=gb2312" />

    <title>3.10新聞中心制作評測題</title>

    <style type="text/css">


    .topList{width:300px; height:180px;border:1px solidd #E8E8E8;margin:auto;}

    li{list-style-type:none;}

    ul{padding:5px;}

    em{width:20px;height:16px;text-align:center;font-style:normal;color:#333;background-image:url(http://img1.sycdn.imooc.com//53cf0fa20001d3dc00200032.jpg);background-position:0 16px;float:left;}

    .top em{background-image:url(http://img1.sycdn.imooc.com//53cf0fa20001d3dc00200032.jpg);background-position:0 0;color:white;}

    a{text-decoration:none;}

    a:hover,a:active{color:red;}





    </style>

    </head>


    <body>

    <div class="topList">

    <ul>

    <li class="top"><em>01</em>

    <p><a href="http://www.xianlaiwan.cn/" >【慕客訪談用戶篇】“有為屌絲”在路上</a></p>

    </li>

    <li class="top"><em>02</em>

    <p><a href="http://www.xianlaiwan.cn/">【有獎活動】給父親的三行書信</a></p>

    </li>

    <li class="top"><em>03</em>

    <p><a href="http://www.xianlaiwan.cn/">《程序猿,請曬出你的童年》活動獲獎公告</a></p>

    </li>

    <li><em>04</em>

    <p><a href="http://www.xianlaiwan.cn/">【慕課訪談】破繭成蝶——美女程序員的蛻變史</a></p>

    </li>

    <li><em>05</em>

    <p><a href="http://www.xianlaiwan.cn/">【獲獎公告】追“球”巔峰,爭當“預言帝”</a></p>

    </li>

    <li><em>06</em>

    <p><a href="http://www.xianlaiwan.cn/">【問卷調查】慕課網用戶學習情況大調查</a></p>

    </li>

    </ul>

    </div>

    </body>


    查看全部
    0 采集 收起 來源:編程練習

    2019-09-15

  • <!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=gb2312" />

    <title>3.1頁面頭部制作練習題</title>

    <style type="text/css">

    li{width:50px; height:30px; list-style-type:none; float:left; text-align:center;}

    ul a{ color:black; text-decoration:none;}

    a:hover,a:active{color:white;width:50px;height:30px;display:block;margin-top:-6px; line-height:30px; background: #BE3948;}/*margin-top使a塊級元素的外邊距基于li往上移6px,再用line-height使文本居中*/

    </style>

    </head>


    <body>

    <h3>課程難度</h3>


    <ul>

    ? ? <li><a href="#">全部</a></li>

    ? ? <li><a href="#">初級</a></li>

    ? ? <li><a href="#">中級</a></li>

    ? ? <li><a href="#">高級</a></li>

    </ul>





    </body>

    </html>



    查看全部
    1 采集 收起 來源:編程練習

    2019-09-14

  • 首頁制作圖

    查看全部
  • 和模型盒模型

    查看全部
    0 采集 收起 來源:盒子模型

    2019-09-09

    1. 不同瀏覽器上ul和body 默認是有margin的。需要首先設置ul的margin和padding都清空。

    2. 因為topList設置的有高度180px,所以li的height設置是有規律計算的,設置34px肯定是會讓整體高度超出topList的。
      正確的計算方法:

      單個li的height= (180px-li上下padding5px*12)/6=20px。

    3. 由于em的高度是16px,em的字體又跟文字的字體大小一樣,所以font-size肯定要小于16px,初步設定font-size為12px。

    4. 設置em的時候設置背景圖片的位置;

    5. 只對p標記左浮動,會讓p標記中的內容顯示在em內容的前面。所以em也要設置float:left;

    6. 特別注意:em是斜體的風格,設置padding的左右,是導致em與li的距離,并不會改變em背景圖片上方的文字內居中。如果此時,直接對em設置text-align:center;em內部的文字默認顯示在最右邊。

      解決辦法:font-style:normal;//把斜體風格改成正常的風格,再加上text-align:center;?
      就能使得em內的文字居中顯示了。

    查看全部
    0 采集 收起 來源:編程練習

    2019-09-05

  • *{margin:0;padding:0;}

    .newsBox{

    ? ? min-height:300px;

    ? ? _height:300px;

    ? ? width:800px;

    ? ? padding:5px;

    ? ? margin:0 auto;

    }

    .newsTitle{

    ? ? font-size:24px;

    ? ? text-align:center;

    ? ? margin-bottom:10px;

    }

    .newsInfo{

    ? ? color:#666;

    ? ? text-align:center;

    ? ? border-bottom:1px dotted #666;


    }

    .newsContent{

    ? ? text-indent:2em;

    ? ? line-height:25px;

    ? ? padding:10px;

    ? ? font-size:14px;

    ? ? font-family:'微軟雅黑';

    }

    .newsContent img{

    ? ? margin:0 auto;

    ? ? display:block;

    }


    查看全部
    0 采集 收起 來源:編程練習

    2019-08-21

舉報

0/150
提交
取消
課程須知
1. 您已具備HTML 常用標簽和屬性。 2. 您已具備CSS 常用屬性和值。 3. 您想提升網頁布局技能。
老師告訴你能學到什么?
1.CSS中盒子模型的使用 2.網頁三列布局方法 3.兩列自適應高度布局方法 4.幻燈片切換效果的制作方法 5.導航菜單的制作方法

微信掃碼,參與3人拼團

微信客服

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

幫助反饋 APP下載

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

公眾號

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

友情提示:

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