tom*_*tom 21 textcolor twitter-bootstrap
在我的索引页面上,我希望h1文本颜色为白色并带有阴影,但我不想在其他页面上更改h1的默认行为.我怎样才能做到这一点?
Con*_*ech 104
在bootstrap 3中这里是更改文本颜色的类:
<p class="text-muted">...</p> //grey
<p class="text-primary">...</p> //light blue
<p class="text-success">...</p> //green
<p class="text-info">...</p> //blue
<p class="text-warning">...</p> //orangish,yellow
<p class="text-danger">...</p> //red
Run Code Online (Sandbox Code Playgroud)
And*_*ich 23
您可以将自己的id或类添加到索引页的body标记,以使用自定义样式定位该页面上的所有元素:
<body id="index">
<h1>...</h1>
</body>
Run Code Online (Sandbox Code Playgroud)
然后,您可以使用您的类或ID定位要修改的元素,如下所示:
#index h1 {
color:red;
}
Run Code Online (Sandbox Code Playgroud)
sk8*_* ツ 8
您还可以应用bootstrap本身提供的默认"文本"类
<h1 class='text-info'>Hey... I'm blue</h1>
Run Code Online (Sandbox Code Playgroud)
http://twitter.github.io/bootstrap/base-css.html
| 归档时间: |
|
| 查看次数: |
107439 次 |
| 最近记录: |