当前位置: 首页 > 工具软件 > Font Custom > 使用案例 >

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

宿丰
2023-12-01

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!

 类似资料: