Webpage Design-div + css-create secondary navigation and AD bar click Close

Source: Internet
Author: User
I am doing a secondary navigation and implementing the ad bar click-close function. The Code is as follows. Copy it to preview the 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 = UTF-8"/>
<Title> untitled document </title>
<Style type = "text/css">
<! --
. L1 {
Width: 151px;
Height: 36px;
Float: left;
Background-color: # FF0000;
Color: #000000;
List-style-type: none;
Margin: 0px;
Padding: 0px;

}
. A2 {
Font-size: 12px;
Text-align: center;
Display: block;
Width: 150px;
Height: 35px;
Line-height: 35px;
Border-top-width: 1px;
Border-right-width: 1px;
Border-bottom-width: 1px;
Border-left-width: 1px;
Border-top-style: solid;
Border-right-style: solid;
Border-bottom-style: solid;
Border-left-style: solid;
Border-top-color: # CC3300;
Border-right-color: # CC3300;
Border-bottom-color: # CC3300;
Border-left-color: # CC3300;

}
A: link {
Color: #000000;
Text-decoration: none;
}
A: visited {
Color: #000000;
Text-decoration: none;
}
A: hover {
Color: # FFFFFF;
Text-decoration: none;
}
A: active {
Color: # FFFFFF;
Text-decoration: none;
}
# Shang {
Width: 604px;
Margin: 0 auto ;}
Span {
Width: 488px;
Color: # F00;
Background-color: # F00;
Position: absolute;
Top: 38px;
Padding: 0px;
Margin: 0px;
Display: none;
Margin-left: 10px;
}
. A1 {
Width: 120px;
Height: 25px;
Float: left;
Display: block;
Line-height: 25px;
Margin: 0px;
Color: #000;
Font-size: 12px;
Text-align: center;
Border: 1px solid # CC3300;
}
. Zhuti {
Width: 605px;
Margin: auto;
}
. Yejiao {
Position: absolute;
Top: 46px;
Width: 32px;
Height: 15px;
Line-height: 15px;
Font-size: 12px;
Color: #000;
Display: block;
Text-align: center;
Cursor: hand;
Background-color: # F00;
Margin-left: 563px;
Border: 1px solid # CC3300;
}
. Neirong {
Width: 593px;
Margin: auto;
Background-color: # F90;
Border: 1px solid # CC3300;
Font-size: 12px;
Color: # FFF;
Padding: 5px;
}
Body {
Margin-top: 2px;
}
-->
</Style>
</Head>

<Body>
<Script>
Function show (n)
{
N. style. display = "block ";
}

Function hid (n)
{
N. style. display = "none ";

}
</Script>
<Div id = "shang">
<Li class = "l1">

<A class = "a2" href = "#" onmouseover = "this. style. backgroundColor = '# CC3300'; show (a1) "onmouseout =" this. style. backgroundColor = '# ff0000'; hid (a1) "> navigation bar (with subnavigation)
</A>

<Span id = "a1">
<A class = "a1" href = "#" onmouseover = "this. style. color = '# ffff'; show (a1) "onmouseout =" this. style. color = '# 8080'; hid (a1) "> subnavigation content </a>
<A class = "a1" href = "#" onmouseover = "this. style. color = '# ffff'; show (a1) "onmouseout =" this. style. color = '# 8080'; hid (a1) "> subnavigation content </a>
<A class = "a1" href = "#" onmouseover = "this. style. color = '# ffff'; show (a1) "onmouseout =" this. style. color = '# 8080'; hid (a1) "> subnavigation content </a>
<A class = "a1" href = "#" onmouseover = "this. style. color = '# ffff'; show (a1) "onmouseout =" this. style. color = '# 8080'; hid (a1) "> subnavigation content </a>
</Span>

</Li>

<Li class = "l1">
<A class = "a2" href = "#" onmouseover = "this. style. backgroundColor = '# CC3300'; "onmouseout =" this. style. backgroundColor = '# ff0000' "> navigation bar content
</A>
</Li>
<Li class = "l1">
<A class = "a2" href = "#" onmouseover = "this. style. backgroundColor = '# CC3300'; "onmouseout =" this. style. backgroundColor = '# ff0000' "> navigation bar content
</A>
</Li>
<Li class = "l1">
<A class = "a2" href = "#" onmouseover = "this. style. backgroundColor = '# CC3300'; "onmouseout =" this. style. backgroundColor = '# ff0000' "> navigation bar content
</A>
</Li>
</Div>
<Div class = "zhui" id =" div1 ">
<Div class = "yejiao" onclick = "div1.style. display = 'none'"> close </div>
<Div class = "neirong">
§ ☆★○ ◎ ● ◇ ◆ □℃, Then, and then # the system crashes, and then changes accordingly.♂♀§ ☆★○ ◎ ● ◇ ◆ □℃ When your documents are in conflict # When your documents are in conflict with each other, then your documents are in conflict with each other. ▲△ ※※→ 〓 ↓ ° #@ & \ _ ︿  ̄ ―♂♀§ ☆★○ ◎ ● ◇ ◆ □℃ When your documents are in conflict # When your documents are in conflict with each other, then your documents are in conflict with each other. ▲△ ※※→ 〓 ↓ ° #@ & \ _ ︿  ̄ ―♂♀§ ☆★○ ◎ ● ◇ ◆ □℃ When your documents are in conflict # When your documents are in conflict with each other, then your documents are in conflict with each other. ▲△ ※※→ 〓 § ☆★○ ◎ ● ◇ ◆ □℃, Then, and then # the system crashes, and then changes accordingly.♂♀§ ☆★○ ◎ ● ◇ ◆ □℃ When your documents are in conflict # When your documents are in conflict with each other, then your documents are in conflict with each other. ▲△ ※※→ 〓 ↓ ° #@ & \ _ ︿  ̄ ―♂♀§ ☆★○ ◎ ● ◇ ◆ □℃ When your documents are in conflict # When your documents are in conflict with each other, then your documents are in conflict with each other. ▲△ ※※→ 〓 ↓ ° #@ & \ _ ︿  ̄ ―♂♀§ ☆★○ ◎ ● ◇ ◆ □℃ When your documents are in conflict # When your documents are in conflict with each other, then your documents are in conflict with each other. ▲△ ※※→ 〓 § ☆★○ ◎ ● ◇ ◆ □℃, Then, and then # the system crashes, and then changes accordingly.♂♀§ ☆★○ ◎ ● ◇ ◆ □℃ When your documents are in conflict # When your documents are in conflict with each other, then your documents are in conflict with each other. ▲△ ※※→ 〓 ↓ ° #@ & \ _ ︿  ̄ ―♂♀§ ☆★○ ◎ ● ◇ ◆ □℃ When your documents are in conflict # When your documents are in conflict with each other, then your documents are in conflict with each other. ▲△ ※※→ 〓 ↓ ° #@ & \ _ ︿  ̄ ―♂♀§ ☆★○ ◎ ● ◇ ◆ □℃ When your documents are in conflict # When your documents are in conflict with each other, then your documents are in conflict with each other. ▲△ ※※→ 〓 § ☆★○ ◎ ● ◇ ◆ □℃, Then, and then # the system crashes, and then changes accordingly.♂♀§ ☆★○ ◎ ● ◇ ◆ □℃ When your documents are in conflict # When your documents are in conflict with each other, then your documents are in conflict with each other. ▲△ ※※→ 〓 ↓ ° #@ & \ _ ︿  ̄ ―♂♀§ ☆★○ ◎ ● ◇ ◆ □℃ When your documents are in conflict # When your documents are in conflict with each other, then your documents are in conflict with each other. ▲△ ※※→ 〓 ↓ ° #@ & \ _ ︿  ̄ ―♂♀§ ☆★○ ◎ ● ◇ ◆ □℃ When your documents are in conflict # When your documents are in conflict with each other, then your documents are in conflict with each other. ▲△ ※※→ 〓 § ☆★○ ◎ ● ◇ ◆ □℃, Then, and then # the system crashes, and then changes accordingly.♂♀§ ☆★○ ◎ ● ◇ ◆ □℃ When your documents are in conflict # When your documents are in conflict with each other, then your documents are in conflict with each other. ▲△ ※※→ 〓 ↓ ° #@ & \ _ ︿  ̄ ―♂♀§ ☆★○ ◎ ● ◇ ◆ □℃ When your documents are in conflict # When your documents are in conflict with each other, then your documents are in conflict with each other. ▲△ ※※→ 〓 ↓ ° #@ & \ _ ︿  ̄ ―♂♀§ ☆★○ ◎ ● ◇ ◆ □℃ When your documents are in conflict # When your documents are in conflict with each other, then your documents are in conflict with each other. ▲△ ※※→ 〓 ↓ ° #@ & \ _ ︿  ̄ ―♂♀§ ☆★○ ◎ ● ◇ ◆ □℃, Then, and then # collapse? </Div>
</Div>
<Div class = "neirong" style = "text-align: center; background-color: # F00"> click "close! </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.