我试图根据悬停的链接显示隐藏 div 块。我有主要类别和子类别。我只想在有人悬停在主类别上时才显示子类别(相关主类别的)。我尝试了以下但似乎不起作用。感谢所有帮助。
代码
<style type="text/css">
<!--
.series-wrapper
{ display:none;}
.brandcat li a:hover .series-wrapper
{ display:block;}
-->
</style>
<div class="brandcat">
<h3>Most Popular Brands</h3>
<ul class="brands">
<li><a href='showbrand.php?bd_id=1'>Apple</a>
<div class='series-wrapper'><h5>Select your Apple Series</h5>
<a href='showseries.php?s_id=1'>Apple Mainseries1</a>
<a href='showseries.php?s_id=3'>Test2</a>
</div>
</li>
<li><a href='showbrand.php?bd_id=2'>Ball</a>
<div class='series-wrapper'><h5>Select your Ball Series</h5>
<a href='showseries.php?s_id=1'>Ball Mainseries1</a>
<a href='showseries.php?s_id=3'>Ball Test2</a>
</div>
</li>
</ul>
</div>