twitter-bootstrap 在 Bootstrap 3 上创建自定义字形图标/字体
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22257610/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Creating Custom Glyphicons Icon/Font on Bootstrap 3
提问by Behseini
Thanks to Mike Causer's post on creating Custom Glyphicons Icon/Font on Bootstrap 3 I have followed these steps but do not know how to finalize it!,
1- Created a Custom SVG file named xoo.svg
2- Dragged and Dropped the xoo.svgto Fontello.com
3- Downloaded The Font with name of icon-xoofile contains following Files and Folders:
感谢 Mike Causer 关于在 Bootstrap 3 上创建自定义 Glyphicons 图标/字体的帖子,我遵循了这些步骤,但不知道如何完成它!,
1- 创建了一个名为xoo.svg
2-xoo.svg拖放到 Fontello.com的自定义 SVG 文件
3-已下载 带有icon-xoo文件名的字体包含以下文件和文件夹:


Can you please let me know if I have to put all of this codes in Bootstrap 3 Fonts and CSS folders? How and where can I Register the CSS files?
since the icon code is 0xe800can I have a CSS claim like:
如果我必须将所有这些代码放在 Bootstrap 3 Fonts 和 CSS 文件夹中,请告诉我吗?如何以及在哪里可以注册 CSS 文件?因为图标代码是0xe800我可以有一个 CSS 声明,如:
.icon-xoo { &:before { content: "<span class="glyphicon icon-xoo"></span>
xe800"; } }
and Finally, how should I call it? is this correct way to do that?
最后,我应该怎么称呼它?这是正确的方法吗?
##代码##Thanks
谢谢
回答by cvrebert
You will need to add an entry for .icon-xooin bootstrap/less/glyphicons.lessand change the value of the Less variable @icon-font-nameto "icon-xoo". You should put the font files in ../fonts/(relative to your bootstrap.css).
您需要为.icon-xooin添加一个条目并将 Less 变量bootstrap/less/glyphicons.less的值更改为“icon-xoo”。您应该将字体文件放入(相对于您的)。@icon-font-name../fonts/bootstrap.css

