我確定這是一個簡單的問題來回答,我很抱歉成爲另一個noob問這種類型的問題,但我花了大約45分鐘試圖使用其他論壇帖子讓這個工作,我無法弄清楚。我想要的是,當我的網頁上的訪問者將鼠標懸停在我旗幟中的某個鏈接上時,會出現包裝中該位置的生物div。真的不知道是怎麼回事字,但這裏是我目前擁有的代碼,我曾嘗試不同的事情,但是這是最新代碼一堆到目前爲止,我已經寫了...在另一個div內的鏈接懸空時出現div
<div class="banner">
<div class="banner_list">
<div class="column" id="column_1">
<p><a href="" id="bittaford_link">Bittaford</a></p>
</div>
<div class="column" id="column_2">
<p><a href="" id="gateway_link">Gateway (Cattledown)</a></p>
</div>
<div class="column" id="column_3">
<p><a href="" id="ridgeway_link">Ridgeway (Plympton)</a></p>
</div>
</div>
</div>
<div class="wrapper">
<div class="church_bio" id="bittaford_bio">Bittaford</div>
<div class="church_bio" id="gateway_bio">Gateway</div>
<div class="church_bio" id="ridgeway_bio">Ridgeway</div>
</div>
和它背後的CSS ...
.banner_list {
width: 660px;
height: 500px;
margin: 100px auto;
padding: 40px 60px;
background-color: rgba(10, 10, 10, 0.9);
}
.banner_list p,
.banner_list a,
.banner_list h1 {
text-align: center;
color: #FFFFFF;
text-decoration: none;
font-weight: 100;
}
.column {
width: 200px;
margin-top: 50px;
float: left;
}
#column_1, #column_2 {
margin-right: 30px;
}
.wrapper {
width: 100%;
height: 1000px;
top: 728px;
background-color: #FFFFFF;
position: absolute;
z-index: 200;
}
.church_bio {
background-color: yellow;
}
#bittaford_bio #bittaford_link:hover {
background-color: red;
}
#gateway_bio #bittaford_link:hover {
background-color: red;
}
#ridgeway_bio #bittaford_link:hover {
background-color: red;
}
我想我已經給更多的代碼比我需要,但我不知道,如果你把所有的代碼,到目前爲止,它會更有幫助。也儘量避免js。
在此先感謝,馬特。
PLZ創建http://jsfiddle.net/ –
我知道你說「避免」,但你想要一個純粹的CSS解決方案,或者你會考慮使用javascropt/jQuery? – Phlume