美好的一天,我在尝试弄清楚如何更改句子中的特定文本时遇到了一些困难。
我有以下文字:
欢迎来到最强传说
我的代码:
<h1 style="text-align: center;"><strong> Welcome to Strongest Legend </strong></h1>
所以我尝试将代码更改为以下内容:
<h1 style="text-align: center;"><strong> Welcome to Strongest</strong></h1><h1 id="legend"><strong> Legend </strong></h1>
我安装了一个名为 Custom CSS 的插件,我在其中放置了所有的 CSS 代码,我尝试通过其 ID 编辑“图例”,但它不起作用。
有人可以解释一下我做错了什么吗?
我想让下面的css代码生效。
.legend {
color: #5E5E5E;
}
我已将其发布在外观 -> 自定义 CSS 中。
抱歉,我忘了在 SO 上发布链接是被禁止的。
最佳答案
使用#legend 而不是.legend
You are using Id not class
关于css - 使用 css 更改选定的文本颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51930470/