在 WordPress 的 Elementor 产品中为产品标题设置背景颜色 [英] Set background color for product title in Products of Elementor in WordPress

查看:46
本文介绍了在 WordPress 的 Elementor 产品中为产品标题设置背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 WordPress + WooCommerce 来开发网站.我在 Elementor 中实现了 Products 小部件.我希望产品标题为红色背景#EC1D38,如图所示.默认设置没有背景颜色设置.任何帮助将不胜感激.谢谢.

I use WordPress + WooCommerce to develop a website. I implement Products widget in the Elementor. I want to have red background #EC1D38 for the product title as shown as the image. The default settings do not have the background color setting. Any help will be appreciated. Thanks.

示例

现状

推荐答案

我在您的 div 中添加了一个名为fruits"的类.

I've added one class in your div is called "fruits".

请将以下 CSS 添加到您的 CSS 文件中.

Please add the below CSS to your CSS file.

.fruits h2.woocommerce-loop-product__title {
    background: #ec1d38;
    color: white !important;
    padding: 15px;
    margin: 0;
}
.fruits li.product.type-product {
    padding: 0 !important;
}
.fruits a.button.product_type_simple {
    display: none;
}

这篇关于在 WordPress 的 Elementor 产品中为产品标题设置背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆