标签:
@font-face { font-family: <FontName>; //自定义的字体名称 src: <source> [<format>][,<source> [<format>]]*; //字体文件路径 [font-weight: <weight>]; //是否加粗 [font-style: <style>]; //是否斜体 }
@font-face { //引入字体文件 font-family: ‘Glyphicons Halflings‘; src: url(‘../fonts/glyphicons-halflings-regular.eot‘); src: url(‘../fonts/glyphicons-halflings-regular.eot?#iefix‘) format(‘embedded-opentype‘), url(‘../fonts/glyphicons-halflings-regular.woff2‘) format(‘woff2‘), url(‘../fonts/glyphicons-halflings-regular.woff‘) format(‘woff‘), url(‘../fonts/glyphicons-halflings-regular.ttf‘) format(‘truetype‘), url(‘../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular‘) format(‘svg‘); } .glyphicon { //基础样式 position: relative; top: 1px; display: inline-block; font-family: ‘Glyphicons Halflings‘; font-style: normal; font-weight: normal; line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } //小图标内容设置 .glyphicon-cloud:before { content: "\2601"; } .glyphicon-envelope:before { content: "\2709"; } ……共计200+图标样式(具体可参考 http://v3.bootcss.com/components/)
标签:
原文地址:http://www.cnblogs.com/mengda1027/p/4542213.html