CSS sliding door horizontal menu bar

Source: Internet
Author: User

The effect is as follows:

Implementation Method: Use the following two images:

 

 

Front-end code:

<Div id = "nagivation">
<Ul>
<Li> <a href = "mainbooks. aspx"> <B> Home </B> </a> </LI>
<Li> <a href = "bookstoretop. aspx? Topid = 1 "> <B> literature </B> </a> </LI>
<Li> <a href = "bookstoretop. aspx? Topid = 2 "> <B> novel </B> </a> </LI>
<Li> <a href = "bookstoretop. aspx? Topid = 3 "> <B> art </B> </a> </LI>
<Li> <a href = "bookstoretop. aspx? Topid = 4 "> <B> management </B> </a> </LI>
<Li> <a href = "bookstoretop. aspx? Topid = 5 "> <B> test </B> </a> </LI>
<Li> <a href = "bookstoretop. aspx? Topid = 6 "> <B> tool book </B> </a> </LI>
<Li> <a href = "bookstoretop. aspx? Topid = 7 "> <B> Technology </B> </a> </LI>
</Ul>
</Div>

 

 

CSS:

# Nagivation
{
Width: 1180px;
Margin-Right: auto;
Margin-left: auto;
Height: 28px;
Background-image: URL ('wangyeimg/daohang.jpg ');
Display: block;
}
# Nagivation ul
{
Margin: 0px;
Display: block;
Height: 28px;
Padding-left: 8px;
}
# Nagivation ul Li
{
Display: block;
Float: left;

Height: 28px;
Padding-top: 5px;
}
# Nagivation ul Li
{
Padding: 5px 0px 0px 14px;
Text-Decoration: none;
Color: white;
Height: 30px;
}
# Nagivation ul Li a B
{
Padding: 0px 14px 0px 0px;
Height: 28px;
}
# Nagivation ul Li A: hover
{
Background-image: URL ('wangyeimg/huadong.jpg ');
Background-position: Right top;

}
# Nagivation ul Li A: hover
{
Background-image: URL ('wangyeimg/huadong.jpg ');
Color: red;

}

 

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.