Navigation bar, drop-down menu

Source: Internet
Author: User

This is a good result. It was found online. I wrote one by myself yesterday, and it will be jittery. No reason is found.

This works well.

<HTML xmlns = "http://www.w3.org/1999/xhtml">

<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312"/>
<Title> jquery drop-down menu </title>
<SCRIPT src = "scripts/jquery-1.4.1.min.js" type = "text/JavaScript"> </SCRIPT>
<Style type = "text/CSS">
Ul {margin: 0; padding: 0 ;}
Ul Li {list-style: None}
# Div {width: 960px; Height: 28px ;}
# Div ul Li {float: Left; Height: 28px; display: inline; line-Height: 28px; padding: 0px 20px; position: relative ;}
# Div ul Li ul {position: absolute; Z-index: 99; display: none; top: 28px; width: 140px; left: 0px ;}
# Div ul Li {display: block; width: 140px; Height: 26px; line-Height: 26px; Background-color: #666; border-bottom: 1px # ffffff solid ;}
# Div ul Li a {color: #000000; text-Decoration: none ;}
</Style>
<SCRIPT type = "text/JavaScript">
$ (Function (){
$ ("# Div ul li"). Hover (function (){
Detail (this).css ("background", "#333333"). Children ("Ul"). slidedown ();
}, Function (){
Detail (this).css ("background", "# fff"). Children ("Ul"). slideup ();
})
$ ("# Div ul Li ul li"). Hover (function (){
Certificate (this).css ("background", "#333 ");
}, Function (){
Certificate (this).css ("background", "#666 ");
})
})
</SCRIPT>
</Head>
<Body>
<Div id = "Div">
<Ul>
<Li> <a href = "#"> homepage </a> </LI>
<Li> <a href = "#"> enterprise resources </a>
<Ul>
<Li> enterprise resources </LI>
<Li> enterprise resources </LI>
</Ul>
</LI>
<Li> <a href = "#"> News Center </a>
<Ul>
<Li> News Center </LI>
<Li> News Center </LI>
<Li> News Center </LI>
</Ul>
</LI>
<Li> <a href = "#"> Project Performance </a>
<Ul>
<Li> Engineering Performance </LI>
<Li> Engineering Performance </LI>
<Li> Engineering Performance </LI>
</Ul>
</LI>
<Li> <a href = "#"> Instruments and equipment </a>
<Ul>
<Li> Instrument and Equipment </LI>
<Li> Instrument and Equipment </LI>
</Ul>
</LI>
<Li> <a href = "#"> enterprise culture </a>
<Ul>
<Li> corporate culture </LI>
<Li> corporate culture </LI>
</Ul>
</LI>
<Li> <a href = "#"> Contact Us </a>
<Ul>
<Li> Contact Us </LI>
<Li> Contact Us </LI>
<Li> Contact Us </LI>
</Ul>
</LI>
</Ul>
</Div>
</Div>
</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.