@font-face {
font-family:"iconfont";/*本身建立字体的名字*/
src:url("fonts/iconfont.eot");/*字体的路径,能够是绝对路径也能够是相对路径*/
src:url("fonts/iconfont.eot?#iefix") format("embedded-opentype"),/*format是浏览器支持字体的格式*/
url("fonts/iconfont.woff") format("woff"),
url("fonts/iconfont.ttf") format("truetype");
font-weight:normal;
font-style:normal;
}web
/*下面是一个class引用*/浏览器
.iconfont {
font-family:"iconfont";
display:inline-block;
vertical-align:middle;
line-height:1;
font-weight:normal;
font-style:normal;
speak:none;
text-decoration:inherit;
text-transform:none;
text-rendering:auto;
-webkit-font-smoothing:antialiased;//让字体更加清晰
-moz-osx-font-smoothing:grayscale;//让字体更加清晰
}字体