javascript - Add hovering effect for a child class when hover parent -
i have html structure following:
<div class="menu"> <div> <span class="mui drop-down" /> </div> </div> i want hover menu class, , change color of drop-down class. and, hovering drop-down itself, should change color. have:
.menu:hover, .menu:hover ~ mui.drop-down{ color: #000000 !important; } but doesn't anything. whats wrong this?
you have errors in both html/css:
1)div element menu class miss closing quotes.
2)css selector mui miss .
according op think following code enough:
.menu:hover .mui.drop-down { color: red; } <div class="menu">menu <div> <span class="mui drop-down">dropdown</span> </div> </div>
Comments
Post a Comment