Want to add a font to the website?
CSS file:
@ font-face {font-family: smFont; Src: url (optima-regular-webfont.woff); } .smfont {font-family: smFont; }
HTML file:
About & lt; Strong class = "smFont" & gt; Company & lt; / Strong>
I have the top but the font has not come out properly. Is my code wrong?
Make sure your path is correct, if you see the console while visiting, You can see the unsuccessful requests in the files.
He is currently targeting the / css / directory for them when they are in the root directory, then simply changing the CSS in the following should solve the problem.
@ font-face {font-family: smFont; Src: url ("../ optima-regular-webfont.woff"); }
No comments:
Post a Comment