samedi 5 mai 2012

CSS 3 Web fonts

Now here is simple font replacement alternative for cuffon. You can use CSS3 fontface property. It’s easy to use.
At first you have to put the original font in to a folder. Then delayer the @font-face property at the css like bellow
@font-face { font-family: ab; src: url(‘fonts/Oswald.ttf’)}
Here you have to name the generated font whatever you like. I declared  it here as “ab”. Now call this font name where you want. As an example if you want to use it for “h1? tag. then the code will be like this below
h1 {
  font-family: ab, sans-serif;
}

Aucun commentaire:

Enregistrer un commentaire