My own font-face in CSS


/ Published in: CSS
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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>

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.