general sibling Combinator
CSS general sibling Combinator reference
The CSS general sibling combinator ( X ~ Y { } ) is used to target and style all elements specified if they happen to be preceeded by other specified elements.
Stuff inside my paragraph...
CSS CODE EXAMPLE
<!DOCTYPE html>
<style type="text/css">
h3 ~ p {
font-style:italic;
color:#09F;
}
</style>
<h2>Some Stuff</h2>
<p>Stuff inside my paragraph...</p>
<p>Stuff inside my paragraph...</p>
<h3>More Stuff</h3>
<p>Stuff inside my paragraph...</p>
<p>Stuff inside my paragraph...</p>
<style type="text/css">
h3 ~ p {
font-style:italic;
color:#09F;
}
</style>
<h2>Some Stuff</h2>
<p>Stuff inside my paragraph...</p>
<p>Stuff inside my paragraph...</p>
<h3>More Stuff</h3>
<p>Stuff inside my paragraph...</p>
<p>Stuff inside my paragraph...</p>
Some Stuff
Stuff inside my paragraph...Stuff inside my paragraph...
More Stuff
Stuff inside my paragraph...
Stuff inside my paragraph...
0 Response to "general sibling Combinator"
Post a Comment