CSS - - . :
::
::after - , CSS ( HTML). DOM, , , :
CSS:
div::after {
content: "hi";
}
HTML:
<div>
hi
</div>
::
::before - , HTML, . :
- , .
::after "after" , ::before .
:
- :
content: "a string"; - Unicode. . - : content: url (/path/to/image.jpg); - . , , , .
- : : ""; - ( , ).
- Counter:
content: counter(li);- Really useful for making lists until a marker appears.
Note : you cannot insert HTML (at least it will display as HTML).
content: "<h1>nope</h1>";
source
share