Twitter Bootstrap中的Font Awesome vs Glyphicons [英] Font Awesome vs Glyphicons in Twitter Bootstrap

查看:81
本文介绍了Twitter Bootstrap中的Font Awesome vs Glyphicons的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Web开发的初学者,最近我开始使用Twitter Bootstrap,我知道它使用 Glyphicons 已经知道如何使用.但是我还遇到了 Font Awesome ,它说它是为Bootstrap构建的.

I am a beginner in web development and I recently started working with Twitter Bootstrap, I know it uses Glyphicons which I already know how to use. But I also came across Font Awesome which says that it is built for Bootstrap.

两者之间有什么区别?我的意思是一个可以替代另一个吗?还是应该在不同的地方使用它们?

What are the differences between the two? I mean is one an alternative for the other? Or should you use them in different places?

推荐答案

在Bootstrap 2.xx中 Glyphyicons 是图像格式的,因此您不能增加大小,轻松更改颜色,背景色等.但是,令人敬畏的字体为您提供了可扩展的矢量图标,这些图标可以立即进行自定义-大小,颜色,阴影以及使用CSS的强大功能可以完成的任何事情.

In Bootstrap 2.x.x Glyphyicons were in image format, hence you can't increase the size, change the color, background-color, etc easily. However, font-awesome gives you scalable vector icons that can instantly be customized — size, color, drop-shadow, and anything that can be done with the power of CSS.

Font-awesome确实是Glyphyicons的替代品,它可以随时使用新图标进行更新. Fat和Mdo计划将Font-awesome集成到Bootstrap版本3中,以替代Glyphyicons.

Font-awesome is really an alternative for Glyphyicons which is getting updated time-to-time with new icons. Fat and Mdo are planning to integrate Font-awesome in bootstrap version 3 as a replacement for Glyphyicons.

我的建议是您将Bootstrap与font-awesome一起使用.首先包含bootstrap css,然后包括Font-awesome css,以便将Glyphyicons替换为font-awesome.

My suggestion is you use bootstrap with font-awesome. First include bootstrap css and then Font-awesome css, so that the Glyphyicons will be override by font-awesome.

更新

bootstrap版本3.x.x 中,glyphicons变为字体格式,即使以12px字体大小也可以很好地呈现.如果您使用的是最新版的fontawesome(即4.01),则可以同时使用两个glyphicons和fontawesome.

In bootstrap version 3.x.x glyphicons become font format, which will render nicely even in 12px font-size. If you're using the latest version of fontawesome, i.e. 4.01, you can use both glyphicons with fontawesome.

这篇关于Twitter Bootstrap中的Font Awesome vs Glyphicons的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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