我在CSS文件中使用自定义Segoe UI字体。此字体在Chrome中正确呈现,但在IE和Firefox中,它在某些地方显示默认字体。
这是CSS代码
body {
margin:0px auto;
padding: 0 0 0px 0;
background-color:#eee;
font-family:"Segoe UI";
font-weight: lighter;
font-size::11px;
color:#333;
overflow-y: scroll;
}
@font-face {
font-family:"Segoe UI";
src: url(images/font/SEGOEUI.eot) format("truetype") /* EOT file for IE */
}
@font-face {
font-family:"Segoe UI";
src: url(images/font/SEGOEUI.ttf) /* TTF file for CSS3 browsers */
}
答案 0 :(得分:1)
尝试使用此代码而不是代码:
body {
margin:0px auto;
padding: 0 0 0px 0;
background-color:#eee;
font-family:'Segoe UI' !important;
font-weight: lighter;
font-size:11px;
color:#333;
overflow-y: scroll;
}
@font-face {
font-family: 'Segoe UI';
src: url('fonts/SEGOEUI.eot'); /* IE9 Compat Modes */
src: url('fonts/SEGOEUI.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('fonts/SEGOEUI.woff') format('woff'), /* Modern Browsers */
url('fonts/SEGOEUI.ttf') format('truetype'), /* Safari, Android, iOS */
url('fonts/SEGOEUI.svg#svgFontName') format('svg'); /* Legacy iOS */
}