使用CSS / LESS,当悬停sidebar-submenus
时,是否有可能以某种方式显示(默认为“display:none;”)sidebar-category
?
我有这个HTML:
<div id="sidebar">
<div id="sidebar-wrapper">
<div id="sidebar-categories">
<div id="menuDashboard" class="sidebar-category sidebar-category-top active">
<i class="fa fa-tachometer"></i>
</div>
</div>
<div id="sidebar-submenus">
</div>
</div>
</div>
我有这个:
body {
&.sidebar-collapsed {
#sidebar-submenus {
display: none;
}
#sidebar-categories:hover {
/*#Display sidebar-submenus with block somehow..? */
}
}
}
答案 0 :(得分:2)
尝试:
#sidebar-categories:hover {
+ #sidebar-submenus { display:block; }
}