如何仅使用Bootstrap no css将文本颜色更改为白色

Shu*_*ham 3 html twitter-bootstrap-3

我想在不使用单行css代码的情况下将文本颜色更改为白色是否可以使用任何Bootstrap类来实现?

Had*_*290 2

文本颜色的类有:.text-muted、.text-primary、.text-success、.text-info、.text-warning 和 .text-danger

默认引导类中没有白色文本颜色。

<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">

<p class="text-muted">This text is muted.</p>
<p class="text-primary">This text is important.</p>
<p class="text-success">This text indicates success.</p>
<p class="text-info">This text represents some information.</p>
<p class="text-warning">This text represents a warning.</p>
<p class="text-danger">This text represents danger.</p>
Run Code Online (Sandbox Code Playgroud)

  • 从 Bootstrap 4 开始,这不再是正确的 https://v4-alpha.getbootstrap.com/utilities/colors/ 现在有一个“text-white”类。 (2认同)