Created
July 8, 2021 19:56
-
-
Save joekenpat/7cc2ca6e675cacb318e8d8aab7f18d2c to your computer and use it in GitHub Desktop.
How to import and use font in a css file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* this css function used to import a font */ | |
@font-face { | |
/* This is the link to the font: can be relative, abosolute, or remote url*/ | |
src: url("../fonts/choice.ttf"); | |
/* set the name of the font family */ | |
font-family: choice; | |
} | |
.new_font_paragragh{ | |
/* set the font name as the font family */ | |
font-family: "choice"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment