【发布时间】:2016-01-19 08:32:01
【问题描述】:
如果可能的话,我想以某种方式分别为 1 个字形着色。 为 Bootstrap 框架中称为“glyphicon-th-large”的字形的每个小方块着色。
【问题讨论】:
-
不……不可能。字形是单个字符而不是单独的元素。
标签: javascript html css twitter-bootstrap glyphicons
如果可能的话,我想以某种方式分别为 1 个字形着色。 为 Bootstrap 框架中称为“glyphicon-th-large”的字形的每个小方块着色。
【问题讨论】:
标签: javascript html css twitter-bootstrap glyphicons
您使用类来选择字形图标,glyphicon-th-large 是该特定图标的类。
只需将样式添加到.glyphicon-th-large,每次使用该图标时,它都会有您选择的颜色。
这是您应该使用的样式(将颜色更改为您想要的任何颜色):
.glyphicon-th-large{
color: red;
}
【讨论】:
只需使用style="color:red" // or anything else
<a style="color:red"><span class="glyphicon glyphicon-th-large"></span></a>
【讨论】: