Posted By

apphp-snippets on 12/22/15


Tagged

css in font-face


Versions (?)

My own font-face in CSS


 / Published in: CSS
 

URL: http://apphp.com/index.php?snippet=css-my-own-font

It allows you to add your own fonts on the page. To convert to different formats use this service Font2Web.

  1. <style type="text/css">
  2. @font-face{
  3. font-family: 'MyFont';
  4. src: url('myfont.eot');
  5. src: url('myfont.eot?#iefix') format('embedded-opentype'),
  6. url('myfont.woff') format('woff'),
  7. url('myfont.ttf') format('truetype'),
  8. url('myfont.svg#webfont') format('svg');
  9. }
  10.  
  11. h1 { font-family: 'MyFont', sans-serif; }
  12. </style>

Report this snippet  

You need to login to post a comment.