user3763367
user3763367

Reputation: 147

CSS How to add new pseudo content

.newclass {
    content: "\00A9";
}

In the above code, a copyright icon shows up. I have a question and a requirement.

Question - Where is this icon come from? any image from my pc, internet or some other way.

Requirement - If I have to introduce a new code, and associate a new icon for that code, how to do it?

Upvotes: 0

Views: 58

Answers (2)

G-Cyrillus
G-Cyrillus

Reputation: 105913

these works with pseudo elements and are unicode characters. http://codepen.io/anon/pen/EFAtk

there a list here : http://unicode-table.com/en/

HTML test

 ©
<p> &#64;
<a href="http://unicode-table.com/en/">http://unicode-table.com/en/</a></p>

CSS test

:before {
color:red;
}
body:before {
    content: "\00A9";
}
p:before {
  content:'\0040';
}

Upvotes: 0

grigno
grigno

Reputation: 3198

It's an unicode escape sequence, here you can find some examples:

http://css-tricks.com/snippets/html/glyphs/

Upvotes: 1

Related Questions