网站建设资讯

NEWS

网站建设资讯

bootstrap中怎么引用fonts-创新互联

这篇文章将为大家详细讲解有关bootstrap中怎么引用fonts,文章内容质量较高,因此小编分享给大家做个参考,希望大家阅读完这篇文章后对相关知识有一定的了解。

10年的连江网站建设经验,针对设计、前端、开发、售后、文案、推广等六对一服务,响应快,48小时及时工作处理。全网营销推广的优势是能够根据用户设备显示端的尺寸不同,自动调整连江建站的显示方式,使网站能够适用不同显示终端,在浏览器中调整网站的宽度,无论在任何一种浏览器上浏览网站,都能展现优雅布局与设计,从而大程度地提升浏览体验。成都创新互联公司从事“连江网站设计”,“连江网站推广”以来,每个客户项目都认真落实执行。

只需要建一个fonts文件夹放在和js,css文件同级目录下,就可以正确引用。

关键是下面这几个文件得有:

glyphicons-halflings-regular.eotglyphicons-halflings-regular.svgglyphicons-halflings-regular.ttfglyphicons-halflings-regular.woff

相关的 CSS 规则写在 dist 文件夹内的 css 文件夹内的 bootstrap.css 和 bootstrap-min.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');        }

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

关于bootstrap中怎么引用fonts就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。


当前标题:bootstrap中怎么引用fonts-创新互联
转载注明:http://cdweb.net/article/dsjosp.html