php图标字体库,制作图标字体字库

工具准备:

1.ps 或者 Illustrator 等

2.FontCreator 字体编辑器

操作步骤

1.在图片软件中调整好单独的图标;

2.打开FontCreator 新建个字体,定义名称,然后删成需要的样子(也可以不删 )。

3.打开一个空白字符图形,点击“导入图像”,导入我们制作一个图标。

4.右击字符图形,选“属性”,调下值 然后插入(这个值用在写页面的时候),做完保存。

5.打开http://www.fontsquirrel.com/tools/webfont-generator上传刚才的字体 在线生成下其他格式的文件 然后下载下来。

6.css写法:

CSS@font-face {

font-family: 'fontName';

src: url('../font/fontName.eot');

src: url('../font/fontName.eot') format('embedded-opentype'),

url('../font/fontName.woff') format('woff'),

url('../font/fontName.ttf') format('truetype'),

url('../font/fontName.svg#fontNameregular') format('svg');

font-weight: normal;

font-style: normal;

}

[class^="icon-"],

[class*=" icon-"] {

font-family: fontName;

font-weight: normal;

font-style: normal;

text-decoration: inherit;

display: inline;

width: auto;

height: auto;

line-height: normal;

vertical-align: baseline;

background-image: none !important;

background-position: 0% 0%;

background-repeat: repeat;

}

[class^="icon-"]:before,

[class*=" icon-"]:before {

text-decoration: inherit;

display: inline-block;

speak: none;

}

.icon-call:before {

content: "\e600 ";

}

7.html:

HTML

完成!

题外话:这边使用的fontCreator工具,类似的工具还有很多,比如:IcoMoon和Iconfont 。道理都一样,先制作svg图标,再由svg生成字体。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值