icomoon字体图标引用代码

1.第一步在样式里声明字体:告诉别人我们自己定义的字体。



@font-face{ /*声明字体 引用字体*/

font-family:'icomoon';
src:url('fonts/icomoon.eot');
src:url('fonts/icomoon.eot?#iefix') format('embedded-opentype'),
url('fonts/icomoon.woff') format('woff'),
url('fonts/icomoon.ttf') format('truetype'),
url('fonts/icomoon.svg#SofiaProLight') format('svg');
font-weight:normal;
font-style:normal;

}



2.第二步给盒子使用字体
span{
font-family: icomoon;
}


3.盒子里面添加结构

span::{

}


<span></span>


猜你喜欢

转载自www.cnblogs.com/Yanss/p/10226477.html