php - 如何更改 li class bg 颜色

标签 php css

如何为这个 li 类添加背景? 例如,我想将代码添加到蓝色。 我需要添加什么

我需要在哪里添加?

谢谢!

<li class="tribe-events-list-widget-events <?php tribe_events_event_classes() ?>">

    <?php do_action( 'tribe_events_list_widget_before_the_event_title' ); ?>
    <!-- Event Title -->
    <h2 class="entry-title summary">
        <a href="<?php echo tribe_get_event_link(); ?>" rel="bookmark"><?php the_title(); ?></a>
    </h2>

    <?php do_action( 'tribe_events_list_widget_after_the_event_title' ); ?> 
    <!-- Event Time -->

    <?php do_action( 'tribe_events_list_widget_before_the_meta' ) ?>

    <div class="duration">
        <?php echo tribe_events_event_schedule_details(); ?>
    </div>

    <?php do_action( 'tribe_events_list_widget_after_the_meta' ) ?>
</li>

最佳答案

CSS:

li.tribe-events-list-widget-events {

background-color: blue;

}

关于php - 如何更改 li class bg 颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25545046/

相关文章:

php - 使用单个查询从 MYSQL 中的 2 个表中根据优先级获取记录

php - 使用 Codeigniter 获取登录用户的所有消息以及每条消息的所有答案

php - 如何在有效的 html 实体中转换像这样的 "\u2764"的 unicode 实体

php - Magento 文件路径错误

javascript - 将 JavaScript 函数应用于除第 i 个元素之外的所有 Array 元素

html - 点击元素下方的 HitTest

php - Ajax调用太慢? JavaScript 和 PHP

javascript - 如何更改整个 slider 的背景图像 - bootstrap

javascript - 如何在不使用 z-index 的情况下制作滑出导航

jquery - Internet Explorer 中的 html 输入按钮不会出现换行符