bootstrap字体图标怎么引用?

bootstrap字体图标怎么引用?下面本篇文章给大家介绍一下Bootstrap正确引用字体图标的方法。有一定的参考价值,有需要的朋友可以参考一下,希望对大家有所帮助。

Bootstrap如何正确引用字体图标?

补充:

其实不需要下面这么麻烦,只需要建一个fonts文件夹放在和js,css文件同级目录下,就可以正确引用,关键是下面这几个文件得有:

1.png-600

第一种(字体文件的路径请灵活改变)

<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的相关知识,可访问:web前端自学!!

以上就是bootstrap字体图标怎么引用?的详细内容,更多请关注0133技术站其它相关文章!

赞(0) 打赏
未经允许不得转载:0133技术站首页 » Bootstrap 教程