css selectors - Append css to a class using a different class on the same element -
i want add opacity: 1;
.main
class (as itself, , not .main.flow
) when .flow
added can affect .main.secondary
.
something similar using mouse events (hover, active).
.main { opacity: 0; }
<div class="main flow"> <div class="not-main"> </div> </div> <div class="main secondary"> </div>
i'm limited structure of html i'm modding css. possible using css?
you'll have select both .main.flow
, other .main
element relative it.
are .main
elements siblings, "flow" class being applied first of them?
if so:
.main { opacity: 0; } .main.flow, .main.flow + .main { opacity: 1; }
wiki
Comments
Post a Comment