The :first-line Pseudo-element
The "first-line" pseudo-element is used to add a special style to the first line of a text.
In the following example the browser formats the first line of text in a p element according to the style in the "first-line" pseudo-element (where the browser breaks the line, depends on the size of the browser window):
Example
p:first-line
{
color:#ff0000;
font-variant:small-caps;
}
{
color:#ff0000;
font-variant:small-caps;
}
HINT: The "first-line" pseudo-element can only be used with block-level elements.
HINT: The following properties apply to the "first-line" pseudo-element:
- font properties
- color properties
- background properties
- word-spacing
- letter-spacing
- text-decoration
- vertical-align
- text-transform
- line-height
- clear
-
Other TopicsCSS :Before pseudo element,CSS :After pseudo element,CSS : Multiple pseudo elements,CSS : pseudo-elements and CSS classes,CSS : First-letter pseudo-element,CSS : First-element pseudo-element,CSS : Syntax for Pseudo elements,CSS : First-line pseudo-element,CSS : All Css pseudo classes/elements,CSS : The lang pseudo classCSS : MEDIA,CSS::STYLING FORMS, mechanical Engineering, English books,Photoshop tutorials,Harry potter,Best 100 english books,Mechanical-old-question-paper,STYLE HTML ELEMENTS WITH SPECIFIC ATTRIBUTES,CSS : HORIZONTAL NAVIGATION BAR,CSS : FLOATING LIST ITEMS,CSS : IMAGE GALLERY,CSS : NAVIGATION BARS,CSS : VERTICAL NAVIGATION BAR,CSS : LIST OF CSS PSEUDO CLASSES
No comments:
Post a Comment