Shu*_*ham 3 html twitter-bootstrap-3
我想在不使用单行css代码的情况下将文本颜色更改为白色是否可以使用任何Bootstrap类来实现?
小智 8
使用Bootstrap-v4.
class="text-white"
Run Code Online (Sandbox Code Playgroud)
参考:https://v4-alpha.getbootstrap.com/utilities/colors/
文本颜色的类有:.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)