Bootstrap框架(图标)

所有可用的图标

包括250多个来自 Glyphicon Halflings 的字体图标。Glyphicons Halflings 一般是收费的,但是他们的作者允许 Bootstrap 免费使用。为了表示感谢,希望你在使用时尽量为 Glyphicons 添加一个友情链接。

 例:用作静态控件的组件作为模板

 

 

 

添加图标颜色,在原来代码的基础上添加下<spam></span>标签即可

图标参考官网:

https://fontawesome.com/

https://fontawesome.com/v4.7.0/

版本4.7

那么fontawesome图标怎么用呢?  接下来需要导入下官网地址https://www.bootcdn.cn/

 

 

 bootsrap利用的是<span>标签引用的,那么fontawesome利用的是<i>标签引用的

 如果我们想fontawesome中的微信图标,搜一下就好了,进入之后点击 Start Using Font Awesome就会进入到以下截图中

 

 

 <!--加上color更改图标颜色-->

<i class="fa fa-weixin" style="color:red;"></i>

 

   You can place Font Awesome icons just about anywhere using the CSS Prefix fa and the icon's name. Font Awesome is designed to be used with inline elements (we like the <i> tag for brevity, but using a <span> is more semantically correct).

 

 

 To increase icon sizes relative to their container, use the fa-lg (33% increase), fa-2xfa-3xfa-4x, or fa-5x classes.

 

 

Use fa-ul and fa-li to easily replace default bullets in unordered lists.

 

 

 

 Use the fa-spin class to get any icon to rotate, and use fa-pulse to have it rotate with 8 steps. Works well with fa-spinnerfa-refresh, and fa-cog.

 

 

To arbitrarily rotate and flip icons, use the fa-rotate-* and fa-flip-*classes.

接下来实例就让微博图标示范下:

 To stack multiple icons, use the fa-stack class on the parent, the fa-stack-1x for the regularly sized icon, and fa-stack-2x for the larger icon. fa-inverse can be used as an alternative icon color. You can even throw larger icon classes on the parent to get further control of sizing.

如果想让禁止发微博可以添加以下代码:

Font Awesome works great with the full range of Bootstrap components.

如:添加Delete按钮参考官网

 

 本地使用需要下载

https://fontawesome.com/v4.7.0/get-started/#modal-download

 

 

 

 

转载于:https://www.cnblogs.com/syf-com/p/10307668.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值