1
<div class="main">
<div class="content">
<div class="content_hide">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
</div>
</div>
<div class="sidebar">
<div class="single_sidebar">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
</div>
</div>
</div>
這是我的HTML代碼。當我懸停single_sidebar元素時,我想要樣式content_hide
div。像一個previus div的CSS選擇器
.single_sidebar:hover @@content_hide {background:red}
如何選擇content_hide
DIV通過CSS當我將鼠標懸停single_sidebar
?
如果你改變你的標記,以便content_hide DIV來側邊欄格在此之後可以輕鬆完成 – Danield
http://stackoverflow.com/questions/4502633/how-to-affect-other-elements-when-a-div-is-hovers –