PLease help!如何在div內保留div
這就是我到目前爲止:http://beauxlent.com/nicole 當你點擊「一個」「兩個」或「三個」,它會帶你到一個仍然在同一頁面上的div。不過,我希望div保留在正確的div中,並仍然在同一頁面上使用#tags。我以前見過這個。
<style type="text/css">
{
padding: 0;
margin: 0;
}
body {
text-align: justify;
overflow: hidden;
background: #F8F8F8;
font: -blocked- arial;
}
table, p {
display: none;
}
div {
width: 100%;
}
.container {width: 800px; display:block; margin:0px auto}
.left {width:200px; float:left; background: #eee; display:block; height:200px;
line- height:2}
.right {width:600px; float:right; background: #808080; display:block; height: 200px;
line-height:2; }
#o {position:absolute; right: 2000px;}
.blog {
background: 0;
position: absolute;
top: 150px;
left: 500px;
width: 290px;
height: 140px;
}
#omg {
z-index: 7;
position: absolute;
top: 1000px;
right: 0;
color: #000;
height: 1000px;
}
#plz {
z-index: 7;
position: absolute;
top: 9000px;
right: 0;
color: #000;
height: 9000px;
}
}
#nande a:hover {
color: #000;
}
#nande {
z-index: 7;
position: absolute;
top: 7000px;
right: 0;
color: #000;
height: 1000px;
}
body, table {
color: #fff;
}
font, table, tr, td, br, p {
font: -blocked- franklin gothic medium;
color: #fff;
}
#content {
width: 100%;
}
#main, #content {
border: 0px none;
background: #fff;
}
}
.framed {
background: #fff;
padding: 5px;
overflow: auto;
position: absolute;
top: 20px;
left: 0px;
}
</style>
<div id="boxed">
<div class="container">
<div class="left">
<a href="#uno" class="big">1</a>
<a href="#dos" class="big">2</a>
<a href="#tres" class="big">3</a>
</div>
<div class="right">
<div id="omg">
<a name="uno"></a>
<div class="framed">
one
</div>
</div>
<div id="nande">
<a name="dos"></a>
<div class="framed">
two
</div>
</div>
<div id="plz">
<a name="tres"></a>
<div class="framed">
three
</div>
</div>
</div>
,我想左側邊欄留在屏幕上。現在它不會停留在屏幕上 –
您能否告訴我們一個你想要完成的事情的例子?我假設你希望每個div(#omg #nande #plz)中的內容在用戶單擊鏈接時出現在#right div內? Javascript/jQuery將成爲你的朋友,但你必須爲你想要隱藏/顯示的div添加一個獨特的id/class。 –