fontello不工作在WordPress的下划线主题
问题描述:
我遇到了Fontello的问题 - everythink正在本地主机上工作,但是当我上传主题(基于下划线创建)它不工作(实际上它工作主页 - 设置为WordPress的开始 - 机器人不在其他人)。fontello不工作在WordPress的下划线主题
您可以在我的测试域webblaster.pl上查看它。
主页是确定 - 在左边底部有固定“社会化媒体”栏 - 尚未风格 - 这就是为什么它看起来这么难看:)
但在->fotografia-home -> kontakt
的底部,你可以看到一些无法正常加载字体。
在头节,我安装使用一个CSS文件:
<link href="<?php bloginfo('stylesheet_directory'); ?>/fonts/fontello/css/fontello.css" rel="stylesheet" type="text/css">
我不知道什么是错的 - 试图改变目录,但没有奏效。
我会感谢所有帮助:)
答
这似乎是一些你的CSS规则将覆盖对方的情况。
在/wp-content/themes/paulinakozan/fonts/fontello/css/fontello.css
有个规则:
[class^="icon-"]::before, [class*=" icon-"]::before {
display: inline-block;
font-family: "fontello"; // <-- IMPORTANT LINE!
font-style: normal;
font-variant: normal;
font-weight: normal;
line-height: 1em;
margin-left: 0.2em;
margin-right: 0.2em;
text-align: center;
text-decoration: inherit;
text-transform: none;
width: 1em;
}
但另一个CSS是由您的网站加载:/wp-content/plugins/modula-best-grid-gallery/scripts/modula.css?ver=4.4.2
还有另外一个规则:
[class^="icon-"]::before, [class*=" icon-"]::before {
font-family: "modula-icons" !important; // <-- ANOTHER IMPORTANT LINE!
font-style: normal !important;
font-variant: normal !important;
font-weight: normal !important;
line-height: 1;
text-transform: none !important;
}
第二FONT-FAMILY定义modula-icons
定义!!重要,所以它赢得了对fontello
! 这就是为什么你的图标加载不正确的原因。这些图标根本不存在于模块图标中。
如果我在Chrome中打开您的网站并在开发人员工具栏中禁用modula-icons规则,社交图标显示正确。
非常感谢你的帮助:) 对不起,这些琐碎的问题。我应该自己检查一下 –