我正在使用 @font-face 更改默认字体。但导航菜单字体没有改变。它不会覆盖默认字体。如果我删除 wp-head() 它工作正常。但我需要 wp-head()。只有默认字体必须从 wp_head() 中删除吗?
@font-face {
font-family: leb-webfont;
src: url(http://www.swaidanews.com/CMS/wp-content/uploads/fonts/leb.ttf);
}
body {font-family:"leb-webfont"!important; color:#333; font-size:16px;}
h1,h2,h3,h4,h5,h6,h7{font-family:"leb-webfont"!important; color:#000;}
也试过这个..
.sf-menu > li > a {font-family:"leb-webfont"!important;}
没用。
如何编辑 wp_head() 并覆盖默认字体?
尝试将您的字体名称放入其中" "
以及包括所有类型的字体以实现浏览器兼容性:
@font-face {
font-family: 'leb-webfont';
src: url('leb-webfont.eot');
src: url('leb-webfont.eot?#iefix') format('embedded-opentype'),
url('leb-webfont.woff') format('woff'),
url('leb-webfont.ttf') format('truetype'),
url('leb-webfont.svg#leb-webfont') format('svg');
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)