我在this blog上应用了此代码,并且字体不适用于侧边栏标题。
@font-face {
font-family: 'gothambold1';
src: url('http://pllfans.com/wp-content/uploads/2015/07/gothambold1.eot');
src: local('gothambold1'), url('http://pllfans.com/wp-content/uploads/2015/07/gothambold1.woff') format('woff'), url('http://pllfans.com/wp-content/uploads/2015/07/gothambold1.ttf') format('truetype');
}
.sidebartitle {
padding-bottom:13px;
font-size:21px;
background-color:#000;
margin-left:-30px;
margin-top:-30px;
margin-right:-30px;
padding:30px;
font-family: 'gothambold1' !important;
}
答案 0 :(得分:1)
使用字体的base64编码并将其添加到@ font-face声明。
@font-face {
font-family: 'gothambold1';
src: url('http://linktofontface.eot');
}
@font-face {
font-family: 'gothambold1';
src: url(data:font/ttf;base64,[insert-encode-here]) format('truetype');
font-weight: normal;
font-style: normal;
}
此处有更多解释:http://nutty-themes.tumblr.com/post/97597308612/an-ongoing-tutorial-series-for-those-who-already