.main-navigation ul li.menu-item-has-children:hover~li {
opacity: 0;
}
Taken from my WordPress theme. What is the meaning of ~li (with the ~ character)?
Thank You
.main-navigation ul li.menu-item-has-children:hover~li {
opacity: 0;
}
Taken from my WordPress theme. What is the meaning of ~li (with the ~ character)?
Thank You
The pre ~ p selector means "each P element that is preceded by a PRE element", but, unlike the pre + p adjacent selector, the element doesn't have to be the direct preceding element.
Therefore this paragraph, too, should be red. Although it's not directly preceded by a , the is a general previous sibling.
This is a paragraph in a div. Since this paragraph doesn't have the as a previous sibling (it's more like an uncle; a previous sibling of this paragraph's parent node), it shouldn't be red.