第一次海报长时间读者问候... 我看了高和低,但还没有找到我想要做的。当链接被点击时显示/隐藏Div
随着在我的网站会有建设布局“大”100多个房间。 我希望能够点击房间,并在页面的右侧拉起有关该房间的信息。 我想要的信息是“隐藏分区” 谢谢大家提前。
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="screen.css" type="text/css" media="all">
</head>
<body>
<div id="building">
<img src="http://upload.wikimedia.org/wikipedia/commons/9/9a/Sample_Floorplan.jpg" alt="" usemap="#map">
<map id="map" name="map">
<area class="link" shape="rect" alt="" title="" coords="137,54,242,161" href="#one" target="" />
<area class="link" shape="rect" alt="" title="" coords="138,182,232,256" href="#two" target="" />
<area class="link" shape="rect" alt="" title="" coords="53,313,170,339" href="#three" target="" />
</map>
</div>
<div id="menu">
<div class="tab" id="one">
This is One
</div>
<div class="tab" id="two">
This is two
</div>
<div class="tab" id="three">
This is three
</div>
</div>
</body>
</html>
这里是我的CSS
html {
padding:0px;
margin:0px;
}
body {
background-color: #e1ddd9;
font-size: 12px;
font-family: Verdana, Arial, SunSans-Regular, Sans-Serif;
color:#564b47;
padding:0px 20px;
margin:0px;
}
#building {
float: left;
width: 75%;
background-color: #fff;
margin:0px 0px 50px 0px;
overflow: auto;
}
#menu {
float: left;
width: 25%;
background-color: #ff99CC;
overflow: auto;
}
看看jQuery的.hide()和.show() – Zak
或jQuery的.toggle() –
感谢我将研制是... – DigitalOutcast