Im trying to apply 'Microgramma' to my logo in. the navbar. What am I doing wrong,? It's install on my computer and in the correct file. Confident I'm doing everything right!
codepen.io/daddchamploo/pen/ZEWNvXN
You need to add the font family first then only font will work for your .html page.
Syntax:
@font-face{
font-family:'you font name';
src:url('your font path');
}
Example:
@font-face{
font-family:helvetica;
src:url(../fonts/helvetica-normal.ttf);
}
Then You can add font in your CSS like:
div.logo {
font-family: helvetica;
}
Add it like this and everything will be working correctly.
Looks you have included the wrong font file name
div.logo{ width: 180px; height: 10px; position: absolute; text-transform: uppercase; font-family:"Michroma"; }
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.