Twitter bootstrap 用引导3中的Glyphicons PRO替换标准Glyphicons半身人?
我已经购买了完整的Glyphicons PRO软件包,并希望与Bootstrap 3一起使用 然而,我似乎找不到关于如何做到这一点的全面文档。Glyphicons网站缺少“如何使用”部分,附带的PDF也没有多大帮助-它提到的Glyphicons.css文件不是下载包的一部分Twitter bootstrap 用引导3中的Glyphicons PRO替换标准Glyphicons半身人?,twitter-bootstrap,glyphicons,Twitter Bootstrap,Glyphicons,我已经购买了完整的Glyphicons PRO软件包,并希望与Bootstrap 3一起使用 然而,我似乎找不到关于如何做到这一点的全面文档。Glyphicons网站缺少“如何使用”部分,附带的PDF也没有多大帮助-它提到的Glyphicons.css文件不是下载包的一部分 非常感谢您提供有关如何进行此替换的任何帮助。在您的引导文件夹中有一个字体文件夹(主要在CSS文件夹中),其中包含Glyphicons字体 这些需要用你的专业版来替换 接下来,您需要在引导CSS中指向新字体(如果字体名称不同)
非常感谢您提供有关如何进行此替换的任何帮助。在您的引导文件夹中有一个字体文件夹(主要在CSS文件夹中),其中包含Glyphicons字体 这些需要用你的专业版来替换 接下来,您需要在引导CSS中指向新字体(如果字体名称不同)。这取决于您使用的技术 但您必须搜索:
@font-face {
font-family: 'Glyphicons Halflings';
src: url('fonts/bootstrap/glyphicons-halflings-regular.eot');
src: url('fonts/bootstrap/glyphicons-halflings-regular.eot?#iefix') format("embedded-opentype"), url('fonts/bootstrap/glyphicons-halflings-regular.woff') format("woff"), url('fonts/bootstrap/glyphicons-halflings-regular.ttf') format("truetype"), url('fonts/bootstrap/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format("svg");
}
并替换字体文件名(或者,如果您将它们放在另一个位置,可能是位置)如上面一些评论所述,它们与Glyphicons PRO软件包中的Glyphicons无引导版本不同 作为总结,以下是主要区别:
- [差异]:[Bootstrap的Glyphicons免费]VS[Glyphicons PRO]
- 图标字体名称:“glyphicons半身人普通版”VS“glyphicons普通版”
- css类名:“glyphicon”,“glyphicon-”*VS“glyphicons”,“glyphicons-”*
- 字体系列:“字形图标半身人”与“字形图标常规”
copy: {
server: {
files: [{//replace the vanilla Bootstrap's FREE glyphicons.less by the PRO's version
expand: true,
dot: true,
cwd: 'path/to/your/less', //put glyphicons.less (PRO version) here
dest:'path/to/bower_components/bootstrap/less',
src: 'glyphicons.less'
}]
}
}
此任务可以在以下位置注册:
grunt.registerTask('serve', [
'copy:server', //replace the vanilla bootstrap's glyphicons
// your other tasks here, for eg:
// 'less:server', // to compile the less
]);
并将在以下时间运行:
grunt serve
谢谢,我试过你的建议,但没能奏效。与半身人相比,Glyphicons PRO似乎有另一种CSS语法……然后您需要用PRO版本中提供的CSS替换原始Glyphicons字体。注意,引导CSS中包含的Glyphicons类有glyphicon glyphicon某物,PRO版本中的类有Glyphicons Glyphicons某物(注意s)在内容上也有细微的差别。例如,
glyphicon垃圾桶
应该是glyphicons垃圾桶
,glyphicon统计数据
完全缺失,glyphicon注释
应该是glyphicon注释
。也许更多。