第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

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

導航條菜單的制作

江老實 Web前端工程師
難度初級
時長23分
學習人數
綜合評分9.53
1004人評價 查看評價
9.8 內容實用
9.4 簡潔易懂
9.4 邏輯清晰
  • 垂直導航條的設置

    利用無序列表<ul>,在每個<li>標簽中加入超鏈接<a>,<ul>的樣式設為 list-style:none;

    <a>的樣式設為 display:none;? text-decoration:none;? ?還可以再加上 text-indent:20px; 或者 text-align:center;? 使文字居中

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

    2019-04-19

  • 如果要給水平菜單增加整體背景,需要對(寬高)進行CSS設置?

    ? ? 菜單<li>浮動后,<li>脫離文檔流,導致<ul>將失去高度和寬度;如果需要對<ul>進行整體背景設置,首先要給<ul>定義寬、高。


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

    2019-04-18

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

    2019-03-19

  • <!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">

    * { margin: 0; padding: 0; font-size: 14px; }

    a { color: #333; text-decoration: none }

    ul { list-style: none; height: 30px; border-bottom: 5px solid #F60; margin-top: 20px; padding-left: 50px; }

    ul li { float: left }

    ul li a { display: block; height: 30px; text-align: center; line-height: 30px; width:120px; background: #efefef; margin-left: 1px; }

    a.on, a:hover { background: #F60; color: #fff; }

    </style>

    <script>

    window.onload=function(){

    ? ? var aA=document.getElementsByTagName('a');

    for(var i=0; i<aA.length; i++){

    aA[i].onmouseover=function(){

    var This=this;

    clearInterval(This.time);

    This.time=setInterval(function(){

    This.style.width=This.offsetWidth+8+"px";

    if(This.offsetWidth>=160)

    clearInterval(This.time);

    },30)

    }

    aA[i].onmouseout=function(){

    clearInterval(this.time);

    var This=this;

    this.time=setInterval(function(){

    This.style.width=This.offsetWidth-8+"px";

    if(This.offsetWidth<=120){

    This.style.width='120px';

    clearInterval(This.time);

    }

    },30)

    }

    }

    }

    </script>

    </head>

    <body>

    <ul>

    ? ? <li><a class="on" href="#">首  頁</a></li>

    ? ? <li><a href="#">新聞快訊</a></li>

    <li><a href="#">產品展示</a></li>

    ? ? <li><a href="#">售后服務</a></li>

    ? ? <li><a href="#">聯系我們</a></li>

    </ul>

    </body>

    </html>


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

    2019-02-27

  • 配圖111

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

    2019-02-27

  • <!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">

    *{margin:0; padding:0; font-size:14px;}

    a{color:#333;text-decoration:none}

    ul{list-style:none; height:50px; border-bottom:5px solid #F60; padding-left:30px;}

    ul li{float:left; margin-top:20px;}

    a{display:block;height:30px;text-align:center; line-height:30px; width:120px; background-color:#ccc;}

    a.on, a:hover{ color:#fff;background-color:#F60;height:40px; line-height:40px;margin-top:-10px;】}

    </style>

    </head>

    <body>

    <ul>

    ? ? <li><a class="on" href="#">首  頁</a></li>

    ? ? <li><a href="#">新聞快訊</a></li>

    ? ? <li><a href="#">產品展示</a></li>

    ? ? <li><a href="#">售后服務</a></li>

    ? ? <li><a href="#">聯系我們</a></li>

    ? </ul>

    </body>

    </html>


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

    2019-02-27

  • <script>

    window.onload=function(){

    ? ? var aLi=document.getElementsByTagName('li');

    for(var i=0; i<aLi.length; i++){

    aLi[i].onmouseover=function(){

    ? ? ? ? ? ? //鼠標經過一級菜單,二級菜單動畫下拉顯示出來

    var oSubNav=this.getElementsByTagName('ul')[0];

    if(oSubNav){

    ? ? var This=oSubNav;

    ? ? clearInterval(This.time);

    ? ? This.time=setInterval(function(){

    ? ? ? ? This.style.height=This.offsetHeight+16+"px";

    ? ? ? ? if(This.offsetHeight>=120)

    ? ? ? ? {

    ? ? ? ? ? ? clearInterval(This.time);

    ? ? ? ? }

    ? ? },30)

    }}

    ? ? ? ? //鼠標離開菜單,二級菜單動畫收縮起來。

    aLi[i].onmouseout=function(){

    var osubNav=this.getElementsByTagName('ul')[0];

    ? ? ? ? ? ? if(osubNav){

    ? ? ? ? ? ? ? ? var This=osubNav;

    ? ? ? ? ? ? ? ? clearInterval(This.time);

    ? ? ? ? ? ? ? ? This.time=setInterval(function(){

    ? ? ? ? ? ? ? ? ? ? This.style.height=This.offsetHeight-16+"px";

    ? ? ? ? ? ? ? ? ? ? if(This.offsetHeight<=0){

    ? ? ? ? ? ? ? ? ? ? ? ? clearInterval(This.time)

    ? ? ? ? ? ? ? ? ? ? }},30)

    ? ? ? ? ? ? ? ? }

    ? ? ? ? ? ? }

    ? ? ? ? ??

    }

    }

    </script>


    查看全部
    0 采集 收起 來源:編程挑戰(zhàn)

    2019-01-18

  • background-position: x y;x向右為正, y向下為正

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

    2019-01-09

  • 實例

    選擇鼠標指針浮動在其上的元素,并設置其樣式:

    a:hover
    {?
    background-color:yellow;
    }


    查看全部
  • text-indent
    查看全部
  • background-position:0 -30px;

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

    2018-12-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">

    *{margin:0; padding:0; font-size:14px;}

    ul{ list-style:none; width:100px}

    a{color:#333;text-decoration:none}

    .nav li a{?

    ? ? display:block;?

    ? ? text-indent:20px;

    ? ? height:30px; line-height:30px; width:100px; background-color:#efefef; margin-bottom:1px;}

    .nav li a:hover{ background-color:#F60; color:#fff}

    </style>


    </head>

    <body>


    <ul class="nav">

    ? ? <li><a href="#">首  頁</a></li>

    ? ? <li><a href="#">新聞快訊</a></li>

    ? ? <li><a href="#">產品展示</a></li>

    ? ? <li><a href="#">售后服務</a></li>

    ? ? <li><a href="#">聯系我們</a></li>

    ? </ul>


    </body>

    </html>


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

    2018-12-22

  • JavaScript中常用的方法,例如:

    網頁可見區(qū)域寬: document.body.offsetWidth (包括邊線的寬)

    網頁可見區(qū)域高: document.body.offsetHeight (包括邊線的高)


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

    2018-12-20

  • window.onload=function(){
    ??? var aA=document.getElementsByTagName('a');
    ?? ?for(var i=0; i<aA.length; i++){
    ?? ??? ?aA[i].onmouseover=function(){
    ?? ??? ??? ?var This=this;
    ?? ??? ??? ?clearInterval(This.time);//清除計時器
    ?? ??? ??? ?This.time=setInterval(function(){
    ?? ??? ??? ??? ??? ?This.style.width=This.offsetWidth+8+"px";
    ?? ??? ??? ??? ?// ?? ?alert(This.offsetWidth)
    ?? ??? ??? ??? ??? ?if(This.offsetWidth>=160)
    ?? ??? ??? ??? ??? ?clearInterval(This.time);
    ?? ??? ??? ??? ?},30)
    ?? ??? ?}
    ?? ??? ?aA[i].onmouseout=function(){
    ?? ??? ??? ??? ?clearInterval(this.time);
    ?? ??? ??? ??? ?var This=this;
    ?? ??? ??? ??? ?this.time=setInterval(function(){
    ?? ??? ??? ??? ??? ?This.style.width=This.offsetWidth-8+"px";
    ?? ??? ??? ??? ??? ?if(This.offsetWidth<=120){
    ?? ??? ??? ??? ??? ??? ?This.style.width='120px';
    ?? ??? ??? ??? ??? ??? ?clearInterval(This.time);
    ?? ??? ??? ??? ??? ?}
    ?? ??? ??? ??? ?},30)
    ?? ??? ?}
    ?? ?}
    }

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

    2018-12-20

  • a:hover{margin-bottom:30px; color:#fff;background-position:0 -30px;}

    background-position:0 -30px;

    0代表的是水平方向沒有任何移動,-30代表的是垂直方向向下移動30px,如果是30px,沒有“-”,那就是向上移動30px了,這個背景圖片移動的參照物是圖片本身所在的塊

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

    2018-12-20

舉報

0/150
提交
取消
課程須知
1.熟悉html知識,尤其對<ul>和<a>比較熟悉; 2.對css樣式比較了解; 3.掌握JavaScript和jQuery基礎知識。
老師告訴你能學到什么?
輕松制作出各種形式的網站導航條菜單

微信掃碼,參與3人拼團

微信客服

購課補貼
聯系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

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

公眾號

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

友情提示:

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