我正试着从本地存储器中得到一种字体。
@font-face {
font-family: const;
src: url(const.ttf);
}
.fp_title1 {
font-family: 'const', trebuchet ms;
font-size: 350%;
font-weight: 100;
-webkit-text-stroke: 1px;
}这不管用。我试过重命名文件,用带引号和不带引号的“字体系列”.
我还尝试将字体与HTML链接起来
<link href='CSS/const.ttf' rel='stylesheet' type='text/css'>在同一个文件夹里,名字是对的。我还是不明白。
编辑:我的CSS文件已经链接,字体是.ttf
发布于 2014-05-07 11:02:26
您可能在代码中有两个错误:路径和扩展。并使用以下格式和专题信托基金:
@font-face {
font-family: 'const';
src: url('const.eot'); /* IE9 Compat Modes */
src: url('const.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('const.woff') format('woff'), /* Modern Browsers */
url('const.ttf') format('truetype'), /* Safari, Android, iOS */
url('const.svg#svgFontName') format('svg'); /* Legacy iOS */
}帮助创建web字体的urls:
http://www.fontsquirrel.com/tools/webfont-generator
http://www.font-face-generator.com/
发布于 2014-05-07 11:00:32
CSS有一个.css文件扩展名,您给它.ttf
https://stackoverflow.com/questions/23515616
复制相似问题