更改 php 返回值的颜色

我的index.php

    <li> 
        <a class="tag">[<?php the_category(' ');?>]</a> //this is the problem line        
        <a href="<?php the_permalink();?>">                  
           <span><?php the_title();?></span>
        </a>
    </li>

我的CSS:

.tag {color: rgba(140, 140, 140, 255);}

这是它的样子: 图片

这就是它应该看起来的样子:图片

我是 php 新手,不知道该尝试什么。预先感谢您!


慕村9548890
浏览 75回答 1
1回答

翻翻过去那场雪

body {  color: #FFF;  background-color: #000;}.tag {color: rgba(140, 140, 140, 255);}<li>     <a class="tag">[TAG]</a>    <a href="#">                         <span>TITLE</span>    </a></li>在我看来很好。必须有另一个 css 规则,它会覆盖您的规则。使用浏览器的开发工具查看是哪一个。在 chome 中 [ctrl]+[shift]+c。然后单击您的元素并检查右侧的“样式”。您可能还想看看css-specifity。
打开App,查看更多内容
随时随地看视频慕课网APP