我最初从google加载我的字体,但后来决定在本地托管它们,仍然没有运气。下面是我的CSS字体的外观
@font-face {
font-family: 'open_sans_condensedbold';
src: url('/campfiles/c9/fonts/opensans-condbold-webfont.eot');
src: url('/campfiles/c9/fonts/opensans-condbold-webfont.eot?#iefix') format('embedded-opentype'),
url('/campfiles/c9/fonts/opensans-condbold-webfont.svg#open_sans_condensedbold') format('svg'),
url('/campfiles/c9/fonts/opensans-condbold-webfont.woff') format('woff'),
url('/campfiles/c9/fonts/opensans-condbold-webfont.ttf') format('truetype'),
url('/campfiles/c9/fonts/opensans-condbold-webfont.svg#open_sans_condensedbold') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'materegular';
src: url('/campfiles/c9/fonts/mate-regular-webfont.eot');
src: url('/campfiles/c9/fonts/mate-regular-webfont.eot?#iefix') format('embedded-opentype'),
url('/campfiles/c9/fonts/mate-regular-webfont.woff') format('woff'),
url('/campfiles/c9/fonts/mate-regular-webfont.ttf') format('truetype'),
url('/campfiles/c9/fonts/mate-regular-webfont.svg#materegular') format('svg');
font-weight: normal;
font-style: normal;
} 当我加载我的页面时,文本根本不显示。奇怪的是,如果我右键单击->inspect元素,文本就会出现。非常奇怪。我读到这是一个chrome问题,在Chromev.33中已经修复,但我是最新的。任何帮助都将非常感谢,谢谢。
发布于 2014-02-28 01:16:03
据我所知,这个问题还没有解决。查看this question,被接受的答案应该会有帮助(也可以复制到这里):
很明显,这是一个已知的Chrome错误。有一个只有css的解决方法可以解决这个问题(更改p选择器以选择您在站点上使用的任何文本元素):
body {
-webkit-animation-delay: 0.1s;
-webkit-animation-name: fontfix;
-webkit-animation-duration: 0.1s;
-webkit-animation-iteration-count: 1;
-webkit-animation-timing-function: linear;
}
@-webkit-keyframes fontfix {
from { opacity: 1; }
to { opacity: 1; }
}似乎只需要告诉Chrome重新绘制文本就可以了
发布于 2014-02-28 01:17:57
你有没有指定任何选择器的字体?
试一试
body {
font-family: 'materegular';
}https://stackoverflow.com/questions/22075492
复制相似问题