这是我的集成代码:
@font-face {font-family: GETwoMedium;
src: url(assets/font/ge_ss_two_medium.woff) format('woff'),
url(assets/font/ge_ss_two_medium.ttf) format('truetype'),
font-weight:400;font-style:normal;}
以下是我如何使用它:
#primary li a {font-weight:bold;font-size:14px; font-family: GETwoMedium; color:#F5B349;}
但是字体不起作用,我尝试使用localhost甚至在线网站都没有用,我还尝试在字体系列名称周围添加撇号,url没有用。 您可以在我的网站here
上查看文件结构:
/style.css /assets/font/ge_ss_two_medium.woff /assets/font/ge_ss_two_medium.ttf
答案 0 :(得分:0)
您的一些语法与评论混淆了
@font-face {
font-family: 'GETwoMedium';
src: url(assets/font/ge_ss_two_medium.eot);
src: url(assets/font/ge_ss_two_medium.woff) format('woff'),
url(assets/font/ge_ss_two_medium.svg) format('svg'),
url(assets/font/ge_ss_two_medium.ttf) format('truetype');
font-weight:400;
font-style:normal;
}