A good JS + CSS tab menu [favorites]

Source: Internet
Author: User

<HTML xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312"/>
<Title> concise tab </title>
<Style type = "text/CSS">
<! --
Body, Div, UL, Li {
Padding: 0;
Text-align: center;
}
Body {
Font: 12px "";
Text-align: center;
}
A: link {
Color: # 00f;
Text-Decoration: none;
}
A: visited {
Color: # 00f;
Text-Decoration: none;
}
A: hover {
Color: # c00;
Text-Decoration: underline;
}
Ul {list-style: none ;}
/* Tab 1 */
# Tab1 {
Width: 460px;
Margin: 0px;
Padding: 0px;
Margin: 0 auto ;}
/* Tab 2 */
# Tab2 {
Width: 576px;
Margin: 0px;
Padding: 0px;
Margin: 0 auto ;}
/* Menu class */
. Menubox {
Width: 100%;
Background: URL (http://www.jb51.net/upload/small/20079299441652.gif );
Height: 28px;
Line-Height: 28px;
}
. Menubox ul {
Margin: 0px;
Padding: 0px;
}
. Menubox Li {
Float: left;
Display: block;
Cursor: pointer;
Width: 114px;
Text-align: center;
Color: #949694;
Font-weight: bold;
}
. Menubox Li. Hover {
Padding: 0px;
Background: # FFF;
Width: pixel PX;
Border-left: 1px solid # a8c29f;
Border-top: 1px solid # a8c29f;
Border-Right: 1px solid # a8c29f;
Background: URL (http://www.jb51.net/upload/small/200792994426548.gif );
Color: #739242;
Font-weight: bold;
Height: 27px;
Line-Height: 27px;
}
. Contentbox {
Clear: both;
Margin-top: 0px;
Border: 1px solid # a8c29f;
Border-top: none;
Height: 181px;
Text-align: center;
Padding-top: 8px;
}
-->
</Style>
<SCRIPT>
<! --
/* Change the display style in the first and second forms */
Function settab (name, cursel, n ){
For (I = 1; I <= N; I ++ ){
VaR menu = Document. getelementbyid (name + I );
VaR con = Document. getelementbyid ("con _" + name + "_" + I );
Menu. classname = I = cursel? "Hover ":"";
Con. style. Display = I = cursel? "Block": "NONE ";
}
}
// -->
</SCRIPT>
</Head>
<Body>





  • News 1

  • News 2

  • News 3

  • News 4




News list 1

News list 2

News list 3

News list 4





  • News 1

  • News 2

  • News 3

  • News 4




News list 1

News list 2

News list 3

News list 4

Related Article

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.