简体   繁体   中英

HTML custom @font-face not displaying correct font

i've downloaded a custom font in ttf format, i want to override my bootstrap font for a header text.

I've added it in my CSS.

@font-face {
  font-family: 'BrauerNeue';
  src: url(brauerneue.ttf);
}

h1 {
    font-family: 'BrauerNeue';
}

Then added a h1 in my page:

<h1>Text</h1>

It still displays in the bootstrap font.

What am i doing wrong?

Check the URL. If all is correct, then:

h1 {
    font-family: "BrauerNeue" !important;
}

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