Answer the question
In order to leave comments, you need to log in
How to select the previous selector?
I'm making a tree-like collapsible structure.
There is such html
<div class="tree-line">
<div class="imgtree last"></div>
<div class="name">cardiovascular agents</div>
<div class="children">
<div class="tree-line">
<div class="imgtree parent none"></div>
<div class="imgtree last"></div>
<div class="name">Calcium channel blocking agents</div>
</div>
</div>
</div>
.tree-line .name + .children
{
color:blue;
cursor:pointer;
}
.tree-line .name
{
color:blue;
cursor:pointer;
} + .children
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question