我没有看到我在CSS属性font-weight中指定的任何值的任何更改。你知道如何解决吗?
提前致谢
struct A {
explicit A(int i);
A() : A(load_something()) {}
};

.glyphicon-custom {
font-weight: lighter;
}

答案 0 :(得分:0)
您需要将font-weight
应用于::before
伪元素,因为它是内容的编写位置。
在下面的代码段中,我分别给图标赋予了字体权重100和900.
.glyphicon-custom::before {
font-weight: 100;
}
.glyphicon-custom-2::before {
font-weight: 900;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<div class="form-group has-feedback"><input type="search" class="form-control"/><span class="glyphicon glyphicon-search form-control-feedback glyphicon-custom"></span></div>
<div class="form-group has-feedback"><input type="search" class="form-control"/><span class="glyphicon glyphicon-search form-control-feedback glyphicon-custom-2"></span></div>