bootstrap字体图标怎么引用

广告:宝塔服务器面板,一键全能部署及管理,送你10850元礼包,点我领取~~~

bootstrap字体图标怎么引用

bootstrap字体图标的引用方法:首先建一个fonts文件夹;然后放在和js、css文件同级目录下;最后通过“src: url('font/glyphicons-halflings-regular.eot');”方式引用字体图标即可。

本教程操作环境:Windows7系统、bootstrap3版,该方法适用于所有品牌电脑。

推荐:《bootstrap教程》

Bootstrap正确引用字体图标:

补充:

其实不需要下面这么麻烦,只需要建一个fonts文件夹放在和js,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 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('font/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');   }
登录后复制

注意:用font-size属性调整字体图标的大小,且不会失真。

更多编程相关知识,请访问:编程学习!!

以上就是bootstrap字体图标怎么引用的详细内容,更多请关注9543建站博客其它相关文章!

9543建站博客
一个专注于网站开发、微信开发的技术类纯净博客。
作者头像
admin创始人

肥猫,知名SEO博客站长,14年SEO经验。

上一篇:微信网页开发之配置说明与常见错误
下一篇:bootstrap怎么设置面板大小

发表评论

关闭广告
关闭广告