Jquery implements multi-level drop-down menu instance code

Source: Internet
Author: User

Copy codeThe Code is as follows:
<! 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>
<Title> jquery implements multi-level drop-down menu-ke leyi </title>
<Style>
/* Navigation style */
# Keleyi-com-nav {
Height: 39px;
Font: 12px Geneva, Arial, Helvetica, sans-serif;
Background: # 2D2D2D;
Border: 1px solid #323232;
Border-radius: 3px;
Min-width: 500px;
Margin-left: 0px;
Padding-left: 0px;
}

# Keleyi-com-nav li {
List-style: none;
Display: block;
Float: left;
Height: 40px;
Position: relative;
Border-right: 1px solid #323232;
}

# Keleyi-com-nav li {
Padding: 0px 10px 0px 30px;
Margin: 0px 0;
Line-height: 40px;
Text-decoration: none;
Border-right: 1px solid #636161;
Height: 40px;
Color: # FFF;
Text-shadow: 1px 1px 1px # 66696B;
}

# Keleyi-com-nav ul {
Background: # f2f5f6;
Padding: 0px;
Border-bottom: 1px solid # dddddddd;
Border-right: 1px solid # dddddddd;
Border-left: 1px solid # dddddddd;
Border-radius: 0px 0px 3px 3px;
Box-shadow: 2px 2px 3px # ECECEC;
-Webkit-box-shadow: 2px 2px 3px # ECECEC;
-Moz-box-shadow: 2px 2px 3px # ECECEC;
Width: 170px;
}
# Keleyi-com-nav. site-name, # keleyi-com-nav. site-name: hover {
Padding-left: 10px;
Padding-right: 10px;
Color: # FFF;
Background: url (http://keleyi.com/keleyi/phtml/jqmenu/4/logo.png) no-repeat 10px 5px;
Width: 160px;
}
# Keleyi-com-nav. site-name {
Width: 129px;
Overflow: hidden;
}
# Keleyi-com-nav li. facebook {
Background: url (http://keleyi.com/keleyi/phtml/jqmenu/4/facebook.png) no-repeat 9px 12px;
}
# Keleyi-com-nav li. facebook: hover {
Background: url (http://keleyi.com/keleyi/phtml/jqmenu/4/facebook.png) no-repeat 9px 12px #010101;
}
# Keleyi-com-nav li. yahoo {
Background: url (http://keleyi.com/keleyi/phtml/jqmenu/4/yahoo.png) no-repeat 9px 12px;
}
# Keleyi-com-nav li. yahoo: hover {
Background: url (http://keleyi.com/keleyi/phtml/jqmenu/4/yahoo.png) no-repeat 9px 12px #010101;
}


# Keleyi-com-nav li: hover {
Background: #010101;
}
# Keleyi-com-nav li {
Display: block;
}
# Keleyi-com-nav ul li {
Border-right: none;
Border-bottom: 1px solid # dddddddd;
Width: 170px;
Height: 39px;
}
# Keleyi-com-nav ul li {
Border-right: none;
Color: # 6791AD;
Text-shadow: 1px 1px 1px # FFF;
Border-bottom: 1px solid # FFFFFF;
}
# Keleyi-com-nav ul li: hover {background: # DFEEF0 ;}
# Keleyi-com-nav ul li: last-child {border-bottom: none ;}
# Keleyi-com-nav ul li: last-child a {border-bottom: none ;}
/* Sub menus */
# Keleyi-com-nav ul {
Display: none;
Visibility: hidden;
Position: absolute;
Top: 40px;
}

/* Third-level menus */
# Keleyi-com-nav ul {
Top: 0px;
Left: 170px;
Display: none;
Visibility: hidden;
Border: 1px solid # DDDDDD;
}
/* Fourth-level menus */
# Keleyi-com-nav ul {
Top: 0px;
Left: 170px;
Display: none;
Visibility: hidden;
Border: 1px solid # DDDDDD;
}

# Keleyi-com-nav ul li {
Display: block;
Visibility: visible;
}
# Keleyi-com-nav li: hover> ul {
Display: block;
Visibility: visible;
}
</Style>
<! -- [If IE 7]>
<Style>
# Keleyi-com-nav {
Margin-left: 0px
}
# Keleyi-com-nav ul {
Left:-40px;
}
# Keleyi-com-nav ul {
Left: 130px;
}
# Keleyi-com-nav ul {
Left: 130px;
}
</Style>
<! [Endif] -->
<Script type = "text/javascript" src = "http://keleyi.com/keleyi/pmedia/jquery/jquery-1.10.2.min.js"> </script>
<Script type = "text/javascript">
$ (Document). ready (function (){
$ ("# Kel" + "eyi-com-nav li"). hover (
Function (){
$ (This). children ('ul '). hide ();
$ (This). children ('ul '). slideDown ('fast ');
},
Function (){
$ ('Ul ', this). slideUp ('fast ');
});
});
</Script>
</Head>
<Body>
<Ul id = "keleyi-com-nav">
<Li class = "site-name"> <a href = "http://keleyi.com"> </a> </li>
<Li class = "yahoo"> <a href = "http://keleyi.com"> navigation menu </a>
<Ul>
<Li> <a href = "http://keleyi.com/a/bjac/veugsmw9.htm"> navigation menu level 2 Classification» </a>
<Ul>
<Li> <a href = "http://keleyi.com"> 1 </a> </li>
<Li> <a href = "http://keleyi.com/a/bjac/r55i6646.htm"> 2 </a> </li>
<Li> <a href = "http://keleyi.com"> 3 </a> </li>
<Li> <a href = "http://keleyi.com"> navigation menu 3» </a>
<Ul>
<Li> <a href = "http://keleyi.com"> navigation menu 4 </a> </li>
<Li> <a href = "http://keleyi.com/a/bjac/c6gu08gm.htm"> 1 </a> </li>
</Ul>
</Li>
</Ul>
</Li>
<Li> <a href = "http://keleyi.com"> 1 </a> </li>
<Li> <a href = "http://keleyi.com"> 2 </a> </li>
</Ul>
</Li>
<Li class = "facebook"> <a href = "http://keleyi.com"> flip pages </a>
<Ul>
<Li> <a href = "http://keleyi.com"> 1 </a> </li>
<Li> <a href = "http://keleyi.com"> 2 </a> </li>
</Ul>
</Li>
</Ul>
</Body>
</Html>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.