font css import code example
Example 1: import font css
@font-face {
font-family: "Open Sans";
src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"),
url("/fonts/OpenSans-Regular-webfont.woff") format("woff");
}
Example 2: how to link fonts css
@font-face {
font-family: myFirstFont;
src: url(sansation_light.woff);
}
div {
font-family: myFirstFont;
}
Example 3: @font-face
@font-face {
font-family: "The name of your font for your file";
src: url("The link to your .ttf or .otf file");
}
Example 4: how to link fonts css
@import url(//fonts.googleapis.com/css?family=Open+Sans);