CSS Sliding Door Effect

Source: Internet
Author: User
CSS Sliding Door Effect

<! 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 = gb2312"/>
<Title> most news </title>
<Style type = "text/CSS">
* {Margin: 0px; padding: 0px ;}
# Barbox {width: 300px; margin: 10px; Border: 1px #99 bbdd solid}
# NVA {float: Left; width: 300px; List-style-type: none; Background: # d7e7f7; Height: 27px; border-bottom: 1px #99 bbdd solid}
# NVA Li {float: Left; Background: # d7e7f7; Height: 27px; line-Height: 28px; padding-left: 10px; font-size: 13px; color: #275c91}

. Boxcontent {font-size: 14px; color: #333; margin: 10px ;}
. Boxcontent ul {list-style-type: none ;}
. Boxcontent ul Li {Line-Height: 23px ;}

# Content1, # content2 {display: None}
</Style>
</Head>
<Body>
<Div id = "barbox">
<Div id = "NVA">
<Li id = "bar1"> News </LI>
<Li id = "bar2"> sports </LI>
<Li id = "bar3"> entertainment </LI>
</Div>
<Div id = "content">
<! -- Content 1 -->
<Div class = "boxcontent" id = "content1">
<Ul>
<Li> Leeco Alliance issues 20 yuan red packets to newly registered members indefinitely </LI>
<Li> Leeco Alliance issues 20 yuan red packets to newly registered members indefinitely </LI>
<Li> Leeco Alliance issues 20 yuan red packets to newly registered members indefinitely </LI>
<Li> Leeco Alliance issues 20 yuan red packets to newly registered members indefinitely </LI>
<Li> Leeco Alliance issues 20 yuan red packets to newly registered members indefinitely </LI>
<Li> Leeco Alliance issues 20 yuan red packets to newly registered members indefinitely </LI>
<Li> Leeco Alliance issues 20 yuan red packets to newly registered members indefinitely </LI>
<Li> Leeco Alliance issues 20 yuan red packets to newly registered members indefinitely </LI>
<Li> Leeco Alliance issues 20 yuan red packets to newly registered members indefinitely </LI>
<Li> Leeco Alliance issues 20 yuan red packets to newly registered members indefinitely </LI>
</Ul>
</Div>
<! -- Content 2 -->
<Div class = "boxcontent" id = "content2">
<Ul>
<Li> the pop-up window of Taiji Cool Network said that payment in arrears will be completed this week. </LI>
<Li> the pop-up window of Taiji Cool Network said that payment in arrears will be completed this week. </LI>
<Li> the pop-up window of Taiji Cool Network said that payment in arrears will be completed this week. </LI>
<Li> the pop-up window of Taiji Cool Network said that payment in arrears will be completed this week. </LI>
<Li> the pop-up window of Taiji Cool Network said that payment in arrears will be completed this week. </LI>
<Li> the pop-up window of Taiji Cool Network said that payment in arrears will be completed this week. </LI>
<Li> the pop-up window of Taiji Cool Network said that payment in arrears will be completed this week. </LI>
<Li> the pop-up window of Taiji Cool Network said that payment in arrears will be completed this week. </LI>
<Li> the pop-up window of Taiji Cool Network said that payment in arrears will be completed this week. </LI>
<Li> the pop-up window of Taiji Cool Network said that payment in arrears will be completed this week. </LI>
</Ul>
</Div>
<! -- Content 3 -->
<Div class = "boxcontent" id = "content3">
<Ul>
<Li> Baidu Alliance: Promotes Baidu reputation survey to win the iPod award </LI>
<Li> Baidu Alliance: Promotes Baidu reputation survey to win the iPod award </LI>
<Li> Baidu Alliance: Promotes Baidu reputation survey to win the iPod award </LI>
<Li> Baidu Alliance: Promotes Baidu reputation survey to win the iPod award </LI>
<Li> Baidu Alliance: Promotes Baidu reputation survey to win the iPod award </LI>
<Li> Baidu Alliance: Promotes Baidu reputation survey to win the iPod award </LI>
<Li> Baidu Alliance: Promotes Baidu reputation survey to win the iPod award </LI>
<Li> Baidu Alliance: Promotes Baidu reputation survey to win the iPod award </LI>
<Li> Baidu Alliance: Promotes Baidu reputation survey to win the iPod award </LI>
<Li> Baidu Alliance: Promotes Baidu reputation survey to win the iPod award </LI>
</Ul>
</Div>
</Div>
</Div>

<SCRIPT type = "text/JavaScript">
Function bardisp (defaultid)
{
VaR _ this = This; // defines the entire window object
VaR taglist = $ ("NVA"). getelementsbytagname ("Li ");
 
For (I = 0; I <taglist. length; I ++)
{
_ This. $ (taglist [I]. ID). value = I + 1; // Save the bar ID in value

$ ("Content" + (I + 1). style. Display = "NONE ";
$ ("Content" + (1). style. Display = "Block"; // these two hidden settings are displayed by default.
$ (Taglist [I]. ID). onmouseover = function ()
{
For (j = 0; j <taglist. length; j ++)
{
$ ("Content" + (J + 1). style. Display = "NONE"; // set all invisible
}
_ This. $ ("content" + this. Value). style. Display = "Block"; // obtain the saved ID as the ID of the content layer.
}
}
}

Function $ (OID ){
If (typeof (OID) = "string ")
Return document. getelementbyid (OID );
Return OID;
}
Bardisp ("content1 ");
</SCRIPT>

</Body>
</Html>

Posted @ 2008-08-07 supers read (259) Comments (0) edit the category of the favorites: Web Standard (HTML)

TD {font-size: 12px}
. Commenttextbox
{
Font-family: verdana;
Font-size: 13px;
}

A. Blue: visited,
A. Blue: active,
A. Blue: link,
A. Blue: hover
{
Color: blue;

}

. Userdata {behavior: URL (# default # userdata )}

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.