:subsequent-sibling
Matched by the '~' symbol, this selector targets any siblings that come AFTER the specified element in the HTML. It doesn't have to be the very next sibling.
Syntax
/* Usage Example */
h2 ~ p {
/* Styles all paragraphs that come after a level-2 heading, as long as they share the same parent */
color: #666;
font-size: 0.9em;
}
:subsequent-sibling Browser support
Widely available
Since
2015 96% global usage
This feature is well established and works across many devices and browser versions. It has been available across browsers since 2015.
1+
1+
3+
12+