简体   繁体   中英

Custom fonts in CSS using font-face

So I have looked, looked, looked, changed and trialled but I can not for the life of me get this to work. Has anyone got any insight into where the problem lies?

@font-face {
  font-family: 'customFont';
  src: url('www.100%CorrectURL.com/font.eot');
  src: url('www.100%CorrectURL.com/font.eot?#iefix') format('embedded-opentype'),
       url('www.100%CorrectURL.com/font.woff') format('woff'),
       url('www.100%CorrectURL.com/font.ttf') format('truetype'),
       url('www.100%CorrectURL.com/font.svg#paulmaulregular') format('svg');
  font-weight: normal;
  font-style: normal;
}

The URL is definately correct (I have changed the one in the above source) but for some reason, it just doesn't load the font to the page.

Your code is correct, but you might remove this two tags:

  font-weight: normal;
  font-style: normal;

IT should work, otherwise, you need to use another webfont (google font are always working)

Note: the url "www.100%CorrectURL.com/font.eot" isn't existing, you need to add a correct url.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM