首页 > 解决方案 > 如何通过 CSS 为 Hestia 自定义字体颜色?

问题描述

我正在尝试为 Hestia 主题自定义一些字体颜色。部分字幕和卡片描述是#999999,在白色背景上很难阅读。

例如,在“功能”部分中,我尝试插入:

.hestia-features .description {
    color: #000000;
    font-size: 18px;
}

.hestia-features .hestia-features-content .feature-box p {
    color: #000000;
    font-size: 16px;
}

无济于事。有什么想法吗?

以下是 HTML 示例:

<div class="col-md-8 col-md-offset-2 hestia-features-title-area"> <h2 class="hestia-title">Title</h2><h5 class="description">This text needs to be black instead of gray</h5> </div> 

或者

<div class="hestia-info"> <a href="#"> <div class="icon" style="color:#180de2"> <i class="fa fa-check"></i> </div> <h4 class="info-title">Title</h4> </a> <p>This text needs to be black</p> </div> 

标签: css

解决方案


检查工作演示后,第一个选择器应该是:

section.hestia-features h5.description {
   color: #000000;
   font-size: 18px;
}

第二个应该是:

section.hestia-features .hestia-info p {
   color: #000000;
   font-size: 16px;
}

如果您使用的是 Wordpress,我还有一个建议是检查主题是否使用缓存插件。如果确实如此,请确保删除缓存。


推荐阅读