<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    我的漫漫程序之旅

    專注于JavaWeb開發(fā)
    隨筆 - 39, 文章 - 310, 評(píng)論 - 411, 引用 - 0
    數(shù)據(jù)加載中……

    超強(qiáng)的Javascript仿QQ導(dǎo)航菜單

    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>仿QQ導(dǎo)航菜單</title>
    <style type="text/css">
    .titleStyle
    {
    background-color
    :#008800;color:#ffffff;border-top:1px solid #FFFFFF;font-size:9pt;cursor:hand;
    }

    .contentStyle
    {
    background-color
    :#eeffee;color:blue;font-size:9pt;
    }


    a
    {
    color
    :blue;
    }

    body
    {
    font-size
    :9pt;
    }

    </style>
    </head>
    <body>

    <script language="JavaScript">
    <!--
     
    var layerTop=20;       //菜單頂邊距
     var layerLeft=30;      //菜單左邊距
     var layerWidth=140;    //菜單總寬
     var titleHeight=20;    //標(biāo)題欄高度
     var contentHeight=200//內(nèi)容區(qū)高度
     var stepNo=10;         //移動(dòng)步數(shù),數(shù)值越大移動(dòng)越慢

     
    var itemNo=0;runtimes=0;
     document.write('
    <span id=itemsLayer style="position:absolute;overflow:hidden;border:1px solid #008800;left:'+layerLeft+';top:'+layerTop+';width:'+layerWidth+';">');

     
    function addItem(itemTitle,itemContent){
       itemHTML
    ='<div id=item'+itemNo+' itemIndex='+itemNo+' style="position:relative;left:0;top:'+(-contentHeight*itemNo)+';width:'+layerWidth+';"><table width=100% cellspacing="0" cellpadding="0">'+
           '
    <tr><td height='+titleHeight+' onclick=changeItem('+itemNo+') class="titleStyle" align=center>'+itemTitle+'</td></tr>'+
           '
    <tr><td height='+contentHeight+' class="contentStyle">'+itemContent+'</td></tr></table></div>';
       document.write(itemHTML);
       itemNo
    ++;
     }

        
    //添加菜單標(biāo)題和內(nèi)容,可任意多項(xiàng),注意格式:
     addItem('歡迎','<BR>歡迎光臨設(shè)計(jì)在線!');
     addItem('網(wǎng)頁陶吧','
    <center><a href="#">網(wǎng)頁工具</a> <BR><BR><a href="#">技術(shù)平臺(tái)</a> <BR><BR><a href="#">設(shè)計(jì)理念</a> <BR><BR><a href="#">更多</a></center>');
     addItem('美工教室','
    <center><a href="#">平面設(shè)計(jì) </a> <BR><BR><a href="#">三維空間</a> <BR><BR><a href="#">設(shè)計(jì)基礎(chǔ)</a> <BR><BR><a href="#">更多..</a></center>');
     addItem('Flash','
    <center><a href="#">基礎(chǔ)教程</a> <BR><BR><a href="#">技巧運(yùn)用</a> <BR><BR><a href="#">實(shí)例剖析</a> <BR><BR><a href="#">更多..</a></center>');
     addItem('多媒體','
    <center><a href="#">DIRECTOR</a> <BR><BR><a href="#">Authorware</a> <BR><BR><a href="#">更多..</a></center>');
     addItem('精品賞析','
    <center><a href="#">設(shè)計(jì)精品</a></center>');

     document.write('
    </span>')
     document.all.itemsLayer.style.height
    =itemNo*titleHeight+contentHeight;

     toItemIndex
    =itemNo-1;onItemIndex=itemNo-1;

     
    function changeItem(clickItemIndex){
       toItemIndex
    =clickItemIndex;
       
    if(toItemIndex-onItemIndex>0) moveUp(); else moveDown();
       runtimes
    ++;
       
    if(runtimes>=stepNo){
         onItemIndex
    =toItemIndex;
         runtimes
    =0;}

       
    else
         setTimeout(
    "changeItem(toItemIndex)",10);
     }


     
    function moveUp(){
       
    for(i=onItemIndex+1;i<=toItemIndex;i++)
         eval('document.all.item'
    +i+'.style.top=parseInt(document.all.item'+i+'.style.top)-contentHeight/stepNo;');
     }


     
    function moveDown(){
       
    for(i=onItemIndex;i>toItemIndex;i--)
         eval('document.all.item'
    +i+'.style.top=parseInt(document.all.item'+i+'.style.top)+contentHeight/stepNo;');
     }

     changeItem(
    0);
    //-->
    </script>
    </body>
    </html> 


    posted on 2008-05-16 17:10 々上善若水々 閱讀(2019) 評(píng)論(1)  編輯  收藏 所屬分類: JavaScript

    評(píng)論

    # re: 超強(qiáng)的Javascript仿QQ導(dǎo)航菜單  回復(fù)  更多評(píng)論   

    你也是把效果圖貼出來看看呀!
    2008-05-19 08:49 | xingui5624
    主站蜘蛛池模板: 青青草原亚洲视频| 亚洲男人的天堂一区二区| 在线免费观看韩国a视频| 免费**毛片在线播放直播| 亚洲自偷自偷偷色无码中文| 无码乱人伦一区二区亚洲一| 亚洲天堂2016| 成年网在线观看免费观看网址| 国产一精品一av一免费爽爽| 日韩版码免费福利视频| 免费国产成人高清在线观看麻豆| 亚洲国产无套无码av电影| 亚洲国产成人久久| 羞羞视频网站免费入口| 国产成人精品无码免费看 | 国产乱子精品免费视观看片| 免费视频淫片aa毛片| 中文字幕亚洲图片| 亚洲乱码在线播放| 五月天婷婷精品免费视频| 8x8×在线永久免费视频| 日本免费人成黄页网观看视频| 亚洲人色婷婷成人网站在线观看| 亚洲国产精品一区二区久| 日本黄页网址在线看免费不卡| 亚洲免费在线播放| 国产一级淫片免费播放电影| 久久亚洲精品中文字幕无码| 亚洲精品无码国产片| 永久免费av无码入口国语片| 女人让男人免费桶爽30分钟| 亚洲乱码国产一区三区| 亚洲色丰满少妇高潮18p| 国产日韩AV免费无码一区二区| 大香人蕉免费视频75| 亚洲日本一区二区| 免费很黄无遮挡的视频毛片| 国产成人免费网站| 亚洲av一综合av一区| 国产精品亚洲lv粉色| 免费专区丝袜脚调教视频|