Thursday, December 27, 2018

css selectors - Select all child elements recursively in CSS

How can you select all child elements recursively?


div.dropdown, div.dropdown > * {
color: red;
}

This class only throws a class on the defined className and all immediate children. How can you, in a simple way, pick all childNodes like this:


div.dropdown,
div.dropdown > *,
div.dropdown > * > *,
div.dropdown > * > * > *,
div.dropdown > * > * > * > * {
color: red;
}

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...