• 菜单导航简单的二级菜单导航


    本篇文章笔者在广东游玩的时候突然想到的...最近就有想写几篇关于菜单导航的笔记,所以回家到之后就奋笔疾书的写出来发布了

        这类效果在b2c商城经经常使用的到,刚束结的项目就用到了,简略分享下。

        Demo:http://www.ostools.net/jsbin/uiafeaei/1

        

        每日一道理
    天又快黑了,这座忙碌的城市又将入睡,让这劳累的“身躯”暂别白日的辛勤,让它入睡,陪伴着城市中的人们进入梦乡。当空的弯月正深情地注视着这座城市与城市中的人们,看着家家户户的灯渐渐熄灭,它在床头悄悄奏响“明月曲”……

        

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    <!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" >
    ul{margin:0;padding:0;list-style-type:none;}
    a{ text-decoration:none;}
    .mold_open_hover,.mold_open{background-image:url(../image/open.png);background-repeat:none;display:inline-block;10px;height:6px;margin-left:10px;position:relative;top:-2px;}
    .mold_open{background-position:0 -6px;}
    .mold_open_hover{background-position:0 0;}
    .mod-menu{position:relative;z-index:1000;left:-1px;margin-left:100px;}
    h1{margin-left:100px;}
    .menu-cont-list a:hover{text-decoration:underline;}
    .mod-menu .menu-item{220px;border-top:solid 1px #d59bb2;border-bottom:solid 2px #d59bb2;position:relative;z-index:22;}
    .mod-menu .menu-item li{height:47px;line-height:47px;background:#feebf3;border-top:solid 1px #f0bfd3;}
    .mod-menu .menu-item li.mouse-bg{background:url(../image/mouse-menu-bg.jpg) no-repeat #fff;position:relative;z-index:22;margin-right:-4px;}
    .mod-menu .menu-item a{color:#c81d61;font-size:16px;padding-left:33px;display:block;height:45px;border-top:solid 1px #f1f2f7;}
    .mod-menu .menu-item a:hover{ text-decoration:none;}
    .mod-menu .menu-cont{position:absolute;left:220px;top:1px;background:#fff;573px;border:solid 1px #F0BFD3;box-shadow:2px 0 10px rgba(210,33,103,0.25);z-index:20;}
    .mod-menu .menu-cont-list{padding:0 30px;}
    .mod-menu .menu-cont-list li{border-bottom:dotted 1px #f0bfd3;padding:10px 0;}
    .mod-menu .menu-cont-list li:last-child{border-bottom:none;}
    .mod-menu .menu-cont-list h3{font-size:14px;font-weight:700;}
    .mod-menu .menu-cont-list h3 a{color:#222;}
    .mod-menu .menu-list-link a{color:#666;line-height:24px;}
    .mod-menu .menu-list-link .long-string{color:#ccc;font-size:12px;padding:0 10px;}
    </ style >
    < script src = "http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type = "text/javascript" ></ script >
    < script type = "text/javascript" >
         $(document).ready(function(){
                 var mod_menu=$(".mod-menu");//导航模块区
                 var menu=function(){
                     var menuItem=$(".menu-item li");//选择导航表列
                     menuItem.each(function(){
                         var _index=$(this).index();//获得前当选择菜单表列的引索
                         $(this).mouseenter(function(){
                             var y = $(this).position().top+1;//获得前当标鼠滑过的表列的顶部坐标
                             $(".menu-cont").show();
                             $(".menu-cont").css("top",y);//要需示显的对应引索内容
                             $(this).addClass("mouse-bg").siblings().removeClass("mouse-bg");
                             $(".menu-cont>div").eq(_index).show().siblings().hide();
                         });
                     });/*导航菜单菜单*/
                     $(".mod-menu").mouseleave(function(){
                         $(".menu-cont").hide();
                         menuItem.removeClass("mouse-bg");
                     })
                 }//开展二级菜单  
                 menu();//执行开展二级菜单函
         });
    </ script >
    </ head >
                   
    < body >
         < h1 >简略的2级菜单导航</ h1 >
         < div class = "mod-menu f-l" >
             < div id = "column-left"
                 < ul class = "menu-item" >
                     < li class = "" >< a href = "trade-wedding.html" >Wedding</ a ></ li >
                     < li class = "" >< a href = "trade-occasion-dresses.html" >Occasion Dresses</ a ></ li >
                     < li class = "" >< a href = "trade-women-s-clothing.html" >Women's Clothing</ a ></ li >
                     < li class = "" >< a href = "trade-women-s-shoes.html" >Women's Shoes</ a ></ li >
                     < li class = "" >< a href = "trade-accessories.html" >Accessories</ a ></ li >
                     < li class = "" >< a href = "trade-beauty-health.html" >Beauty &amp; Health</ a ></ li >
                 </ ul > <!--一级菜单表列-->
                 < div class = "menu-cont hide" style = "display: none; top: 241px;" >
                     < div class = "menu-cont-list" style = "display: none;" >
                     < ul >
                         < li >
                             < h3 >< a href = "wedding-dresses-c1_2.html" >Wedding Dresses</ a ></ h3 >
                             < div class = "menu-list-link" ></ div >
                         </ li >
                         < li >
                             < h3 >< a href = "bridesmaid-dresses-c1_3.html" >Bridesmaid Dresses</ a ></ h3 >
                             < div class = "menu-list-link" ></ div >
                         </ li >
                         < li >
                              < h3 >< a href = "wedding-party-dresses-c1_4.html" >Wedding Party Dresses</ a ></ h3 >
                             < div class = "menu-list-link" >
                             < a title = "" href = "mother-of-the-brides-dresses-c1_4_36.html" >Mother of the Brides Dresses</ a >
                             < span class = "long-string" >|</ span >
                             < a title = "" href = "flower-girl-dresses-c1_4_37.html" >Flower Girl Dresses</ a >
                             < span class = "long-string" >|</ span >
                             < a title = "" href = "wedding-guest-dresses-c1_4_38.html" >Wedding Guest Dresses</ a >
                             </ div >
                         </ li >
                         < li >
                             < h3 >< a href = "wedding-accessories-c1_6.html" >Wedding Accessories</ a ></ h3 >
                             < div class = "menu-list-link" >
                                 < a title = "" href = "fabric-swatch-c1_6_100.html" >Fabric Swatch</ a >
                                 < span class = "long-string" >|</ span >
                                 < a title = "" href = "bridal-lingerie-c1_6_101.html" >Bridal Lingerie</ a >
                                 < span class = "long-string" >|</ span >
                                 < a title = "" href = "wedding-veils-c1_6_48.html" >Wedding Veils</ a >
                                 < span class = "long-string" >|</ span >
                                 < a title = "" href = "wedding-gloves-c1_6_51.html" >Wedding Gloves</ a >
                                 < span class = "long-string" >|</ span >
                                 < a title = "" href = "wedding-shawls-c1_6_47.html" >Wedding Shawls</ a >
                                 < span class = "long-string" >|</ span >
                                 < a title = "" href = "wedding-flowers-c1_6_52.html" >Wedding Flowers</ a >
                                 < span class = "long-string" >|</ span >
                                 < a title = "" href = "wedding-petticoats-c1_6_120.html" >Wedding Petticoats</ a >
                             </ div >
                         </ li >
                        </ ul >
                     </ div >
                     < div class = "menu-cont-list" style = "display: none;" >
                         < ul >
                             < li >
                                 < h3 >< a href = "prom-dresses-c103_39.html" >Prom Dresses</ a ></ h3 >
                                 < div class = "menu-list-link" >
                                 </ div >
                             </ li >
                             < li >
                                 < h3 >< a href = "military-ball-dresses-c103_118.html" >Military Ball  Dresses</ a ></ h3 >
                                 < div class = "menu-list-link" >
                                 </ div >
                             </ li >
                             < li >
                                 < h3 >< a href = "evening-dresses-c103_40.html" >Evening Dresses</ a ></ h3 >
                                 < div class = "menu-list-link" >
                                 </ div >
                             </ li >
                             < li >
                                 < h3 >< a href = "cocktail-dresses-c103_41.html" >Cocktail Dresses</ a ></ h3 >
                                 < div class = "menu-list-link" >
                                 </ div >
                             </ li >
                             < li >
                                 < h3 >< a href = "ball-gowns-c103_43.html" >Ball Gowns</ a ></ h3 >
                                 < div class = "menu-list-link" >
                                 </ div >
                             </ li >
                             < li >
                                 < h3 >< a href = "homecoming-dresses-c103_44.html" >Homecoming Dresses</ a ></ h3 >
                                 < div class = "menu-list-link" >
                                 </ div >
                             </ li >
                             < li >
                                 < h3 >< a href = "little-black-dresses-c103_45.html" >Little Black Dresses </ a ></ h3 >
                                 < div class = "menu-list-link" >
                                 </ div >
                             </ li >
                             < li >
                                 < h3 >< a href = "quinceanera-dresses-c103_46.html" >Quinceanera Dresses</ a ></ h3 >
                                 < div class = "menu-list-link" >
                                 </ div >
                             </ li >
                         </ ul >
                     </ div >
                     < div class = "menu-cont-list" style = "display: none;" >
                         < ul >
                             < li >
                                 < h3 >< a href = "dresses-c7_8.html" >Dresses</ a ></ h3 >
                                 < div class = "menu-list-link" >
                                 </ div >
                             </ li >
                             < li >
                                 < h3 >< a href = "clubwear-c7_9.html" >Clubwear</ a ></ h3 >
                                 < div class = "menu-list-link" >
                                 </ div >
                             </ li >
                             < li >
                                 < h3 >< a href = "leggings-c7_12.html" >Leggings</ a ></ h3 >
                                 < div class = "menu-list-link" >
                                 </ div >
                             </ li >
                             < li >
                                 < h3 >< a href = "lingeries-c7_13.html" >Lingeries</ a ></ h3 >
                                 < div class = "menu-list-link" >
                                     < a title = "" href = "bras-c7_13_54.html" >Bras</ a >
                                     < span class = "long-string" >|</ span >
                                     < a title = "" href = "babydolls-c7_13_56.html" >Babydolls</ a >
                                     < span class = "long-string" >|</ span >
                                     < a title = "" href = "teddies-c7_13_57.html" >Teddies</ a >
                                     < span class = "long-string" >|</ span >
                                     < a title = "" href = "panties-c7_13_58.html" >Panties</ a >
                                     < span class = "long-string" >|</ span >
                                     < a title = "" href = "hosiery-c7_13_59.html" >Hosiery</ a >
                                 </ div >
                             </ li >
                             < li >
                                 < h3 >< a href = "bustiers-corsets-c7_102.html" >Bustiers &amp; Corsets</ a ></ h3 >
                                 < div class = "menu-list-link" >
                                 </ div >
                             </ li >
                             < li >
                                 < h3 >< a href = "costumes-c7_53.html" >Costumes</ a ></ h3 >
                                 < div class = "menu-list-link" >
                                     < a title = "" href = "sexy-costumes-c7_53_110.html" >Sexy Costumes</ a >
                                     < span class = "long-string" >|</ span >
                                     < a title = "" href = "christmas-costumes-c7_53_119.html" >Christmas Costumes</ a >
                                     < span class = "long-string" >|</ span >
                                     < a title = "" href = "halloween-costumes-c7_53_111.html" >Halloween Costumes</ a >
                                     < span class = "long-string" >|</ span >
                                     < a title = "" href = "halloween-accessories-c7_53_112.html" >Halloween Accessories</ a >
                                     < span class = "long-string" >|</ span >
                                     < a title = "" href = "zentai-c7_53_121.html" >Zentai</ a >
                                 </ div >
                             </ li >
                             < li >
                                 < h3 >< a href = "swimwear-c7_11.html" >Swimwear</ a ></ h3 >
                                 < div class = "menu-list-link" >
                                 </ div >
                             </ li >
                             < li >
                                 < h3 >< a href = "activewear-c7_10.html" >Activewear</ a ></ h3 >
                                 < div class = "menu-list-link" >
                                 </ div >
                             </ li >
                         </ ul >
                     </ div >
                     < div class = "menu-cont-list" style = "display: none;" >
                         < ul >
                             < li >
                                 < h3 >< a href = "heels-c116_60.html" >Heels</ a ></ h3 >
                                 < div class = "menu-list-link" >
                                 </ div >
                             </ li >
                             < li >
                                 < h3 >< a href = "pumps-c116_117.html" >Pumps</ a ></ h3 >
                                 < div class = "menu-list-link" >
                                 </ div >
                             </ li >
                             < li >
                                 < h3 >< a href = "dance-shoes-c116_62.html" >Dance Shoes</ a ></ h3 >
                                 < div class = "menu-list-link" >
                                 </ div >
                             </ li >
                             < li >
                                 < h3 >< a href = "boots-c116_63.html" >Boots</ a ></ h3 >
                                 < div class = "menu-list-link" >
                                 </ div >
                             </ li >
                         </ ul >
                     </ div >
                     < div class = "menu-cont-list" style = "display: none;" >
                         < ul >
                             < li >
                                 < h3 >< a href = "evening-bags-c15_113.html" >Evening Bags</ a ></ h3 >
                                 < div class = "menu-list-link" >
                                 </ div >
                             </ li >
                             < li >
                                 < h3 >< a href = "hats-scarves-c15_16.html" >Hats &amp; Scarves</ a ></ h3 >
                                 < div class = "menu-list-link" >
                                 < a title = "" href = "womens-hats-c15_16_64.html" >Womens Hats</ a >
                                 < span class = "long-string" >|</ span >
                                 < a title = "" href = "womens-scarves-c15_16_65.html" >Womens Scarves</ a >
                                 </ div >
                             </ li >
                             < li >
                                 < h3 >< a href = "jewelry-c15_17.html" >Jewelry</ a ></ h3 >
                                 < div class = "menu-list-link" >
                                 < a title = "" href = "earrings-c15_17_66.html" >Earrings</ a >
                                 < span class = "long-string" >|</ span >
                                 < a title = "" href = "necklaces-c15_17_67.html" >Necklaces</ a >
                                 < span class = "long-string" >|</ span >
                                 < a title = "" href = "rings-c15_17_68.html" >Rings</ a >
                                 </ div >
                             </ li >
                             < li >
                                 < h3 >< a href = "watches-c15_18.html" >Watches</ a ></ h3 >
                                 < div class = "menu-list-link" >
                                 </ div >
                             </ li >
                         </ ul >
                     </ div >
                     < div class = "menu-cont-list" style = "display: block;" >
                         < ul >
                             < li >
                                 < h3 >< a href = "wigs-hair-extensions-c19_23.html" >Wigs &amp; Hair extensions</ a ></ h3 >
                                 < div class = "menu-list-link" >
                                 </ div >
                             </ li >
                             < li >
                                 < h3 >< a href = "fascinators-c19_69.html" >Fascinators</ a ></ h3 >
                                 < div class = "menu-list-link" >
                                 </ div >
                             </ li >
                             < li >
                                 < h3 >< a href = "makeup-tools-c19_21.html" >Makeup Tools</ a ></ h3 >
                                 < div class = "menu-list-link" >
                                 </ div >
                             </ li >
                             < li >
                                 < h3 >< a href = "spas-massagers-c19_71.html" >Spas &amp; Massagers</ a ></ h3 >
                                 < div class = "menu-list-link" >
                                 </ div >
                             </ li >
                             < li >
                                 < h3 >< a href = "health-fitness-c19_70.html" >Health &amp; Fitness</ a ></ h3 >
                                 < div class = "menu-list-link" >
                                 </ div >
                             </ li >
                         </ ul >
                     </ div >
                 </ div >
             </ div > <!--二级菜单内容-->
         </ div >
    </ body >
    </ html >

    文章结束给大家分享下程序员的一些笑话语录: 祝大家在以后的日子里. 男生象Oracle般健壮; 女生象win7般漂亮; 桃花运象IE中毒般频繁; 钱包如Gmail容量般壮大, 升职速度赶上微软打补丁 , 追女朋友像木马一样猖獗, 生活像重装电脑后一样幸福, 写程序敲代码和聊天一样有**。

  • 相关阅读:
    QTextStream 居然接受FILE*这样的传统参数
    基于IOCP的高速文件传输代码
    tornado web框架
    Kaggle入门
    NET Core 介绍
    Wireshark
    设计和应用分布式调用跟踪系统
    Visual Studio Code和Docker开发asp.net core和mysql应用
    背单词
    多环境开发
  • 原文地址:https://www.cnblogs.com/xinyuyuanm/p/3053074.html
Copyright © 2020-2023  润新知