1.自定义字体:
@font-face {
/* 字体命名 */
font-family: "叶根";
src: url(../images/叶根友特色空心简体.ttf)
}
div {
font-family: "叶根";
}
2,自定义图标(利用伪类使用)
利用伪类来使用图标
@font-face {
font-family: "iconfont";
src: url('../iconfont/iconfont.eot');
src: url('../iconfont/iconfont.eot?#iefix') format('embedded-opentype'),
url('../iconfont/iconfont.svg#icomoon') format('svg'),
url('../iconfont/iconfont.woff') format('woff'),
url('../iconfont/iconfont.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
.iconfont {
font-family: "iconfont";
}
.meinv::after {
content: "\e66a";
}
.qq::after {
content: "\e665";
}
结构:<span class="iconfont meinv"></span>
<span class="iconfont qq"></span>