Pseudo-elements
A CSS pseudo-element is used to style specified parts of an element.
name | description |
---|---|
::after | Creates a pseudo-element that is the last child of the selected element. It is often used to add cosmetic content to an element with the content property. It is inline by default. |
::before | Creates a pseudo-element that is the first child of the selected element. It is often used to add cosmetic content to an element with the content property. It is inline by default.
|
::first-letter | Applies styles to the first letter of the first line of a block-level element, but only when not preceded by other content such as images or inline tables.
|
::first-line | Applies styles to the first line of a block-level element. |
::selection | Applies styles to the part of a document that has been highlighted by the user.
Only followed css properties can be changed:
|