Pseudo Elements in CSS3
The :fist-line and :fist-letter pseudo elements allow you to apply styles to the fist line and fist letter respectively.
- :first-line
Figure shows an HTML code where the :fist-line pseudo element will be used.
The Code Snippet in the style sheet declares the style that will be applied to the fist line
in the paragraph.
in the paragraph.
p:fist-line
{
font-family: “Tahoma”;
font-weight: bolder;
background-color: #FFFFCC;
}Specifies the styles to be applied to the fist line of the paragraph content.
{
font-family: “Tahoma”;
font-weight: bolder;
background-color: #FFFFCC;
}Specifies the styles to be applied to the fist line of the paragraph content.
- :first-letter
Figure shows an example of the HTML code for the :fist-letter pseudo element.
Explanation for the code shown in figure is as follows:
p:first-letter
Specifies the styles to be applied on the first letter of the paragraph content
Specifies the styles to be applied on the first letter of the paragraph content
No comments: