回答編集履歴

1

CSSを追加

2018/04/08 10:05

投稿

defghi1977
defghi1977

スコア4756

test CHANGED
@@ -1,3 +1,119 @@
1
1
  http://fonts.googleapis.com/earlyaccess/notosansjp.css
2
2
 
3
3
  に直接アクセス(URLバーにコピーしてCSSの中身を表示)して, その中身を`style`要素にコピペする方法もあります.
4
+
5
+
6
+
7
+ 例えばこの内容を直接コピペします.
8
+
9
+ ```CSS
10
+
11
+ /*
12
+
13
+ * Noto Sans JP (japanese) http://www.google.com/fonts/earlyaccess
14
+
15
+ */
16
+
17
+ @font-face {
18
+
19
+ font-family: 'Noto Sans JP';
20
+
21
+ font-style: normal;
22
+
23
+ font-weight: 100;
24
+
25
+ src: url(//fonts.gstatic.com/ea/notosansjp/v5/NotoSansJP-Thin.woff2) format('woff2'),
26
+
27
+ url(//fonts.gstatic.com/ea/notosansjp/v5/NotoSansJP-Thin.woff) format('woff'),
28
+
29
+ url(//fonts.gstatic.com/ea/notosansjp/v5/NotoSansJP-Thin.otf) format('opentype');
30
+
31
+ }
32
+
33
+ @font-face {
34
+
35
+ font-family: 'Noto Sans JP';
36
+
37
+ font-style: normal;
38
+
39
+ font-weight: 300;
40
+
41
+ src: url(//fonts.gstatic.com/ea/notosansjp/v5/NotoSansJP-Light.woff2) format('woff2'),
42
+
43
+ url(//fonts.gstatic.com/ea/notosansjp/v5/NotoSansJP-Light.woff) format('woff'),
44
+
45
+ url(//fonts.gstatic.com/ea/notosansjp/v5/NotoSansJP-Light.otf) format('opentype');
46
+
47
+ }
48
+
49
+
50
+
51
+ @font-face {
52
+
53
+ font-family: 'Noto Sans JP';
54
+
55
+ font-style: normal;
56
+
57
+ font-weight: 400;
58
+
59
+ src: url(//fonts.gstatic.com/ea/notosansjp/v5/NotoSansJP-Regular.woff2) format('woff2'),
60
+
61
+ url(//fonts.gstatic.com/ea/notosansjp/v5/NotoSansJP-Regular.woff) format('woff'),
62
+
63
+ url(//fonts.gstatic.com/ea/notosansjp/v5/NotoSansJP-Regular.otf) format('opentype');
64
+
65
+ }
66
+
67
+ @font-face {
68
+
69
+ font-family: 'Noto Sans JP';
70
+
71
+ font-style: normal;
72
+
73
+ font-weight: 500;
74
+
75
+ src: url(//fonts.gstatic.com/ea/notosansjp/v5/NotoSansJP-Medium.woff2) format('woff2'),
76
+
77
+ url(//fonts.gstatic.com/ea/notosansjp/v5/NotoSansJP-Medium.woff) format('woff'),
78
+
79
+ url(//fonts.gstatic.com/ea/notosansjp/v5/NotoSansJP-Medium.otf) format('opentype');
80
+
81
+ }
82
+
83
+ @font-face {
84
+
85
+ font-family: 'Noto Sans JP';
86
+
87
+ font-style: normal;
88
+
89
+ font-weight: 700;
90
+
91
+ src: url(//fonts.gstatic.com/ea/notosansjp/v5/NotoSansJP-Bold.woff2) format('woff2'),
92
+
93
+ url(//fonts.gstatic.com/ea/notosansjp/v5/NotoSansJP-Bold.woff) format('woff'),
94
+
95
+ url(//fonts.gstatic.com/ea/notosansjp/v5/NotoSansJP-Bold.otf) format('opentype');
96
+
97
+ }
98
+
99
+ @font-face {
100
+
101
+ font-family: 'Noto Sans JP';
102
+
103
+ font-style: normal;
104
+
105
+ font-weight: 900;
106
+
107
+ src: url(//fonts.gstatic.com/ea/notosansjp/v5/NotoSansJP-Black.woff2) format('woff2'),
108
+
109
+ url(//fonts.gstatic.com/ea/notosansjp/v5/NotoSansJP-Black.woff) format('woff'),
110
+
111
+ url(//fonts.gstatic.com/ea/notosansjp/v5/NotoSansJP-Black.otf) format('opentype');
112
+
113
+ }
114
+
115
+ ```
116
+
117
+ NOTE:
118
+
119
+ この他にも`link`要素からCSSを読み込むことも可能です.