M
M
Mikhail Shatilov2014-02-28 01:46:19
css
Mikhail Shatilov, 2014-02-28 01:46:19

What does content mean in css?

Faced with the fact that chrome does not draw icons, F12, and there is neither img nor bg.
CSS:

font-family: 'genericons';
content: "\f411";
font-size: 1.5em;

If you cancel the content and turn it on again, then everything is drawn.
How does the browser understand that content: "\f411" is an icon?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
Dmitry Evgrafovich, 2014-02-28
@Tantacula

This is the specified character in the genericicons font. Put a different symbol or choose a different font

S
Seva Sargsyan, 2014-02-28
@sevasargsyan

The content property allows you to insert generated content into the text of a web page that is not originally in the text.

C
ClassicRed, 2014-02-28
@ClassicRed

read about :after , :before

Q
Quber, 2014-02-28
@Quber

With the help of this construction
div {
content: "Some text"
}
You can insert some text into this same div. Most often used to insert special characters

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question