bootstrap中fonts怎么引用

互联网 19-7-19
其实不需要下面这么麻烦,只需要建一个fonts文件夹放在和js,css文件同级目录下,就可以正确引用。

关键是下面这几个文件得有:(推荐学习:Bootstrap视频教程)

glyphicons-halflings-regular.eot glyphicons-halflings-regular.svg glyphicons-halflings-regular.ttf glyphicons-halflings-regular.woff

相关的 CSS 规则写在 dist 文件夹内的 css 文件夹内的 bootstrap.css 和 bootstrap-min.css 文件上。

字体文件的路径请灵活改变

<style type="text/css">         @font-face {             font-family: 'Glyphicons Halflings';             src: url('font/glyphicons-halflings-regular.eot');             src: url('font/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),              url('font/glyphicons-halflings-regular.woff') format('woff'),              url('font/glyphicons-halflings-regular.ttf') format('truetype'),              url('fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');         } </style>

所以 font-face 规则实际上是在找到 glyphicons 地方声明 font-family 和位置。

更多Bootstrap相关技术文章,请访问Bootstrap教程栏目进行学习!

以上就是bootstrap中fonts怎么引用的详细内容,更多内容请关注技术你好其它相关文章!

来源链接:
免责声明:
1.资讯内容不构成投资建议,投资者应独立决策并自行承担风险
2.本文版权归属原作所有,仅代表作者本人观点,不代表本站的观点或立场
标签: bootstrap
上一篇:php获取远程图片并下载保存到本地的方法分析 下一篇:bootstrap怎么设置图标大小

相关资讯