我的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 新手,不知道該嘗試什么。預先感謝您!
1 回答

翻翻過去那場雪
TA貢獻2065條經驗 獲得超14個贊
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。
- 1 回答
- 0 關注
- 222 瀏覽
添加回答
舉報
0/150
提交
取消