在网页设计里,字体的显示是个问题。最普遍用的是宋体,但是宋体在 Win 7 下的表现真的很难看。雅黑端庄一些,但是随着字体大小,感觉汉字的大小也会有区别。小站现在用的字体是是宋体 + Arial/Georgia,因为习惯了也没多在意,其实对于英文字体有其它更好的选择。
比如 Bitter 字体,用来做标题倒是不错:
1 |
<div style= "text-align:center; font-size:24px; font-family:Bitter;" >Welcome To NowaMagic.net</div> |
Welcome To NowaMagic.net
CSS 怎么调用 Bitter 字体?
01 |
@font-face { |
02 |
font-family : 'Bitter' ; |
03 |
font-style : normal ; |
04 |
font-weight : 400 ; |
05 |
src : local ( 'Bitter-Regular' ), url (http://themes.googleusercontent.com/ static /fonts/bitter/v 4 /s 9 gJB 935 qk_YG 8 d-lnTdvA.woff) format ( 'woff' ); |
06 |
} |
07 |
@font-face { |
08 |
font-family : 'Bitter' ; |
09 |
font-style : normal ; |
10 |
font-weight : 700 ; |
11 |
src : local ( 'Bitter-Bold' ), url (http://themes.googleusercontent.com/ static /fonts/bitter/v 4 /JGVZEP 92 dXgoQBG 1 CnQcfD 8 E 0 i 7 KZn-EPnyo 3 HZu 7 kw.woff) format ( 'woff' ); |
12 |
} |
其实,这是 Google 推出的Google Font Directory和Google Font API两项服务,Google联合了众多的字体设计者为用户提供了多种漂亮的字体。具体可以参看以前写的一篇文章:《用Google Font API来丰富网页字体》。
这里仅仅抛砖引玉,国内实在太少网站用 Google Font API 了。
评论