在一些 - 但不是在所有地方使用Bootstrap 2将glyphicons的颜色更改为蓝色 [英] Change the color of glyphicons to blue in some- but not at all places using Bootstrap 2

查看:108
本文介绍了在一些 - 但不是在所有地方使用Bootstrap 2将glyphicons的颜色更改为蓝色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为我的UI使用Bootstrap框架。我想改变我的字形的颜色为蓝色,但不是在所有地方。在某些地方,它应该使用默认颜色。

I am using the Bootstrap framework for my UI. I want to change the color of my glyphicons to blue, but not in all places. In some places it should use the default color.

我引用了这两个链接,但我没有发现任何有用的。

I have referred to these two links, but I am not finding anything helpful.

推荐答案

要在2.3.2引导程序中添加新图标,我们必须在您的文件中添加 Font Awsome css。完成后,我们可以使用css重写样式以更改颜色和大小。

Finally I found answer myself. To add new icons in 2.3.2 bootstrap we have to add Font Awsome css in you file. After doing this we can override the styles with css to change the color and size.

<link href="http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">

CSS

.brown{color:#9b846b}

如果我们想更改图标的颜色只是添加棕色类和图标将变成棕色。它还提供各种尺寸的图标。

If we want change the color of icon then just add brown class and icon will turn in brown color. It also provide icon of various size.

HTML

<p><i class="icon-camera-retro icon-large brown"></i> icon-camera-retro</p> <!--brown class added-->
<p><i class="icon-camera-retro icon-2x"></i> icon-camera-retro</p>
<p><i class="icon-camera-retro icon-3x"></i> icon-camera-retro</p>
<p><i class="icon-camera-retro icon-4x"></i> icon-camera-retro</p>

这篇关于在一些 - 但不是在所有地方使用Bootstrap 2将glyphicons的颜色更改为蓝色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆