您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

bootstrap中fonts怎么引用

2025/2/3 23:58:30发布28次查看
其实不需要下面这么麻烦,只需要建一个fonts文件夹放在和js,css文件同级目录下,就可以正确引用。
关键是下面这几个文件得有:(推荐学习:bootstrap视频教程)
glyphicons-halflings-regular.eotglyphicons-halflings-regular.svgglyphicons-halflings-regular.ttfglyphicons-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怎么引用的详细内容。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product