【问题标题】:Replacing the Glyphicons icons or Adding some new ones to it替换 Glyphicons 图标或添加一些新图标
【发布时间】:2014-12-29 04:08:04
【问题描述】:

当我查看主题文件时,它有一个名为 glyphicons 的文件夹,在 /wp-content/plugins/nhpoptions/img/glyphicons ,这个文件夹有 png图片命名 glyphicons_000_glass.png 等等,直到 glyphicons_349_readability.png ,我认为这太简单了,我只需要用我自己的图片替换,所以我重命名了我的图片 glyphicons_349_readability.png 并替换了旧的,但这并没有解决它。仍然出现相同的图标。请告诉我我错过了什么, 这是目录的截图

测试站点链接 = http://test.yoapp.nl/ 主题 = http://themeforest.net/item/couponer-coupons-discounts-wp-theme/8322172 *****更新***** 主题中有一个名为 font-awesome.min.css 的文件,其中包含从 font awesome 添加的图标,现在我想从 font awesome 添加更多图标,但我仍然坚持添加自己的图标。

【问题讨论】:

  • 您需要将链接发送到问题所在的站点或演示站点。您是否尝试过清除缓存?在其他浏览器中查看过?
  • 测试站点链接 = test.yoapp.nl 主题 = themeforest.net/item/couponer-coupons-discounts-wp-theme/… 。主题中有一个名为 font-awesome.min.css 的文件,它有从 font awesome 添加的图标,现在我想从 font awesome 添加更多图标,但我仍然坚持添加自己的图标。
  • 具体是哪个字形图标。它们很可能被嵌入到 css 中
  • 是的,它们是通过 css 文件从 font awesome 添加的

标签: css wordpress


【解决方案1】:

主题的作者正在使用 CSS 来嵌入图标,使用 style.css 文件中的 font-family 和 content 属性。例如:

style.css - 第 713 行

.filter-tabs ul.nav-tabs li.active:before {
    font-family: 'FontAwesome';
    font-size: 32px;
    color: #24b6ac;
    content: '\f0d7'; /* This refers to fa-caret-down */
    position: absolute;
    bottom: -14px;
    left: 47%;
}

还有

a.btn-top:before {
    font-family: "FontAwesome";
    font-size: 31px;
    content: "\f0da"; /* refers to fa-caret-right */
    position: absolute;
    left: 14px;
    color: #fff;
    top: 128px;
}

这些可以在您的 style.css 文件中找到。我敢肯定,还有 4 个您可以自己追踪的实例。这是通过将 font-family 属性设置为 Font-Awesome 并为 content 属性设置 unicode 来完成的。您可以在此处查看图标的完整列表,包括它们的类和 unicode:http://fortawesome.github.io/Font-Awesome/cheatsheet/

【讨论】:

    猜你喜欢
    • 2015-11-26
    • 2022-10-15
    • 2022-01-20
    • 2014-03-29
    • 2016-11-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多