How to put special characters with ::after?

Asked

Viewed 850 times

4

Here’s the code, I want to put the character :

h1::after{
	content: ©
}

1 answer

5


You need to use CSS Unicode character, example:

h1::after{
  content:"\00a9";
  font-size: 14px;
  position: relative;
  top: -10px;
  left: -5px;
}
<h1>
Empresa
</h1>

List of special characters

  • You know how to leave this character overwritten (in HTML the <sup tag is used>)???

  • @nelson450 see my edition.

  • that’s not what I meant, I wanted her to have the effect of something like "x squared"

  • @nelson450 see edition now.

  • 1

    @nelson450 Very good, but you can also simply change the position and everything below for: vertical-align: super;

  • @Leonfreire yes, also works :)

Show 1 more comment

Browser other questions tagged

You are not signed in. Login or sign up in order to post.