Google Font Directory-Google Font API
Posted on | 五月 29, 2010 | No Comments
Google在5月20日宣布推出Google Font Directory和Google Font API两项服务。在 Google Font Directory中,Google联合了众多的字体设计者为用户提供了多种漂亮的字体,但现在全部是英文字体,相信今后会有中文字体。Google Font API 和Google Font Directory是相辅相成的,用户正是通过Google Font API来使用Google Font Directory中的字体。
下面让我们看看如何使用Google Font API 。
1.在 Google Font Directory查找字体
进入Google Font Directory选择合适的字体。点击选择的字体可以查看它在各种大小下的显示效果。
2.引用字体文件
由于这些字体在本地系统中不存在,所以必须在页面中引用它们的字体文件。这些文件托管在Google的云中,引用它们通过下面的方式。
<link href='http://fonts.googleapis.com/css?family=Reenie+Beanie' rel='stylesheet' type='text/css'>
3.使用字体
使用字体通过将html节点的font-family样式设置为上面引用的字体。
h1 { font-family: 'Reenie Beanie', arial, serif; }
最终效果
很炫吧,去尝试一下!
相关文章:
- Change Font/-size
- google api ajaxfeeds
- 微软的22道数据结构算法面试题
- 浅读”google-seo-report-card”:感想
- 在C++中嵌入JavaScript——Google V8 JavaScript Engine使用体验
评论|Comments
留言|Leave a Reply

![如果您自认为是一位忠实的Silverlight-Fans,那么请将此标志放到您的博客中成为一名真正的[银光使者]](http://images.cnblogs.com/cnblogs_com/alamiye010/Silverlighter1.jpg)