我在这个博客上应用了这个代码,字体在侧边栏标题上不起作用
@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;
}
使用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