我在我的Web应用程序中使用了@ font-face,如下所示:
@font-face {
font-family: BKoodak;
src: url('../Content/Styles/ThirdParties/Fonts/BKoodakBold.eot'); /* IE9 Compatibility Modes */
src: url('../Content/Styles/ThirdParties/Fonts/BKoodakBold.eot?') format('eot'), /* IE6-IE8 */
url('../Content/Styles/ThirdParties/Fonts/BKoodakBold.woff') format('woff'), /* Modern Browsers */
url('../Content/Styles/ThirdParties/Fonts/BKoodakBold.ttf') format('truetype'); /* Safari, Android, iOS */
}
然后像这样使用它:
body {
line-height: 1;
font-family:BKoodak
}
问题是什么?
编辑:在网络标签(Chrome)中我过滤字体,但我发现浏览器根本没有得到字体!并在控制台我没有得到任何404错误!我很困惑!怎么了?
答案 0 :(得分:0)
您确定自己的文件地址吗? 您可以使用此代码并更改文件地址
@font-face {
font-family: 'BKoodakBold';
src: url('fonts/BKoodakBold.eot?#') format('eot'), /* IE6–8 */
url('fonts/BKoodakBold.woff') format('woff'), /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
url('fonts/BKoodakBold.ttf') format('truetype'); /* Saf3—5, Chrome4+, FF3.5, Opera 10+ */
}