CSS: first-line pseudo-element
CSS selectors complete reference manual
Examples
The first line of the selected style for each <p> element:
p: first-line
{
background-color: yellow;
}
{
background-color: yellow;
}
try it"
Definition and Usage
: First-line selector to specify style selector first row.
Note:: first-line selector can use the following properties:
- font properties
- color properties
- background properties
- word-spacing
- letter-spacing
- text-decoration
- vertical-align
- text-transform
- line-height
- clear
Note: "first-line" select suitable for block-level element.
Browser Support
Figures in the table represent the first browser to support the version number of the property.
选择器 | |||||
---|---|---|---|---|---|
::first-line | 1.0 | 9.0 部分从5.5 |
1.0 | 1.0 | 7.0 部分从3.5 |
related articles
CSS tutorial: CSS pseudo-classes