CSS Before And After Pseudo Elements Explained !

preview_player
Показать описание
The ::before and ::after pseudo-elements in CSS allows you to insert content onto a page without it needing to be in the HTML.

The value for content can be
A string: content: "a string"; – special characters need to be specially encoded as a unicode entity.
Nothing: content: ""; – Useful for clearfix and inserting images as background-images (set width and height, and can resize with background-size).
A counter: content: counter(li); – Useful for styling lists (we can use ::marker instead).

Note : You cannot insert HTML, that will be rendered as HTML.

#css #csstricks #css3
Рекомендации по теме