E.Meir
E.Meir

Reputation: 2216

CSS content attribute, what it means

wanted to put a social icons on my site, when looking for some i ran across this site:

A site with a social icons that i want to adapt

enter image description here

then i saw that they are not images:

enter image description here

I don't know that css attribute "content"- what is it?

what is \e006, is it a font? looked at the site resources but didn't see anything related.

and looked for it on google "css content attribute" and "css \e006" But no luck.

Upvotes: 0

Views: 2473

Answers (1)

Ali Gajani
Ali Gajani

Reputation: 15091

The ::before selector inserts content before the content of the selected class that is .icon-instagram. We use the content property to specify the content to insert. You can only use the content property with pseudo-elements like :after and :before.

In your case, \e006 is a UTF-8 character. What happens is, whenever something has the class .icon-instagram applied to it, it will append this character before it. This is what it means by the pseudo-element :before. It might be a glyphicon. (Instagram icon).

Upvotes: 4

Related Questions