Home > Archives > 2011年1月 Archive
2011年1月 Archive
Google Font APIの簡単な使い方メモ
- 2011年1月14日 20:46
- HTML
http://code.google.com/webfonts ここのリストから好きなフォントをクリック
↓
[Launch in font previewer] てボタンをポチっとな
↓
右下に黄色で反転してる領域からそれぞれコピー
↓
<link href="//fonts.googleapis.com/css?family=hogehoge" rel="stylesheet" type="text/css" >
<style>
body {
font-family: 'fugafuga', serif;
font-size: 36px;
font-style: normal;
font-weight: 400;
text-shadow: none;
text-decoration: none;
text-transform: none;
letter-spacing: 0em;
word-spacing: 0em;
line-height: 1.2;
}
</style>
上の2箇所をそれぞれ
@charset "utf-8";
@import url(http://fonts.googleapis.com/css?family=hogehoge);
h1 {
font-family: 'fugafuga', serif;
}
つー感じにコピペして、ファイル名を適当に font-setting.css とかつけて、使いたいcssから
@import url("font-setting.css");
で引っ張ってくればおk。
- Comments: 0
- TrackBacks: 0
- 360
- アーマーゾーン