fontcustom.css,html - Custom @Font-face CSS - Stack Overflow

Along with .woff you also need to add other font types as well

@font-face {

font-family: pacifico;

src: url(pacifico.eot); /* IE9 Compat Modes */

src: url(pacifico.eot?#iefix) format(embedded-opentype), /* IE6-IE8 */

url(pacifico.woff) format(woff), /* Modern Browsers */

url(pacifico.ttf) format(truetype), /* Safari, Android, iOS */

url(pacifico.svg#svgFontName) format(svg); /* Legacy iOS */

}

#nav ul li {

font-family:pacifico, arial, helvetica, sans-serif;

font-size:18px;

display: block;

margin-left:30px;

}

also you need to confirm path of fonts with respect to CSS file. also its a good practice along with custom fonts you should also give web safe fonts like arial, helvetica etc. so in case if your custom font wont work then this font will be applied

Hope it helps!

Along with .woff you also need to add other font types as well @font-face { font-family: pacifico; src: url(pacifico.eot); /* IE9 Compat Modes */ src: url(pacifico.eot?#iefix) format(embedded-opentype), /* IE6-IE8 */ url(pacifico.woff) format(woff), /* Modern Browsers */ url(pacifico.ttf) format(truetype), /* Safari, Android, iOS */ url(pacifico.svg#svgFontName) format(svg); /* Legacy iOS */ } #nav ul li { font-family:pacifico, arial, helvetica, sans-serif; font-size:18px; display: block; margin-left:30px; } also you need to confirm path of fonts with respect to CSS file. also its a good practice along with custom fonts you should also give web safe fonts like arial, helvetica etc. so in case if your custom font wont work then this font will be applied Hope it helps!
经验分享 程序员 微信小程序 职场和发展