Pseudo-elements and CSS Classes
Pseudo-elements can be combined with CSS classes:
p.article:first-letter {color:#ff0000;}
<p class="article">A paragraph in an article</p>
<p class="article">A paragraph in an article</p>
The example above will display the first letter of all paragraphs with class="article", in red.
No comments:
Post a Comment