我已经使用 Bootstraps Glyphicons 几天了,我尝试在带有 glyphicon 图标的按钮中添加一些文本:
<button type="button" class="btn btn-default pull-left" data-toggle="collapse" data-bind="attr:{'href':'#'+'TableA'}">
<span class="glyphicon glyphicon-th-list" aria-hidden="true" data-bind="text:' Details'"></span>
</button>
点击它会显示一个表格。我需要将文本设为 Arial,但如果我在 bootstrap.css
中更改它或添加:
<span class="glyphicon glyphicon-download-alt" aria-hidden="true" data-bind="text:' Download', style:{fontFamily: 'Arial'}"></span>
它将文本字体系列更改为 Arial,但字形图标消失了。 我究竟做错了什么?可以更改带有字形图标的按钮内文本的字体系列吗?
最佳答案
字体在我扩展短<span/>
后修复了扩展的定义 ( <span></span>
)。
原版(字体无效):
<button type="button" class="btn btn-default">
<span class="glyphicon glyphicon-send"/>
Send message
</button>
固定版本:
<button type="button" class="btn btn-default">
<span class="glyphicon glyphicon-send"></span>
Send message
</button>
我真的不明白为什么这对我有用......
关于jquery - Bootstrap Glyphicons 更改按钮上的字体系列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32821616/