html - <p> 元素颜色错误

标签 html css twitter-bootstrap

我在 <p> 中有一些文字标签显示为黑色。我添加了一个名为 white 的 css 类,我已将其赋予应该使其变为白色的元素。

这是在浏览器中显示页面后对 html 的检查:

<p class="text-center vertical-center white">Center-aligned text.</p>

这是我的 CSS 类:

.white {
    color: white;
}

这是元素的计算样式:

color rgb(51, 51, 51)

#333body (scaffolding.less 31)

我不知道 scaffolding.less 是什么,但我正在使用一些库/框架,例如 angular 2 和 bootstrap。我的类肯定应该覆盖 scaffolding.less 吗?

最佳答案

您好,现在您可以尝试使用 p tagclass

编写此 Css

像这样

body p.white, .white{color:#fff;}

而且如果你只使用 .white class 用于 color white 你可以用这个

.white{color: #ffffff !important;} // used only this if you have only change color

关于html - <p> 元素颜色错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34670589/

相关文章:

html - 2 张图片并排 - Bootstrap

javascript - 第二个下拉菜单运行不佳。

javascript - Jquery 鼠标悬停功能未触发

来自 url 的 html 的 Android textview

html - 如何在运行时使用 CSS 在 HTML 元素之前插入一些内容

javascript - Bootstrap Nav 宽度在 Chrome 中显示不同

twitter-bootstrap - 集成 bootstrap-tagsinput、boostrap3-typeahead 和 Bloodhound 的问题

javascript - Firefox 中的 Jquery append 表单

jQuery addClass() 后跟访问宽度返回错误值

HTML 卡片图标不固定在该给定位置;他们随着卡片的名字而改变