teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

3

表示されたコードの記述

2018/04/02 13:49

投稿

ami15821
ami15821

スコア56

title CHANGED
File without changes
body CHANGED
@@ -43,6 +43,23 @@
43
43
  ```
44
44
  ### 試したこと
45
45
  demoページのCSSのfont-family: "design_plus";をクロームの検証でチェックを外すとアイコンが『 □ 』になるのを確認。
46
+
47
+ ```ここに言語を入力
48
+ @font-face {
49
+ font-family: "design_plus";
50
+ src: url('/wp/wp-content/themes/vogue_tcd051/assets/fonts/design_plus.woff?v=1.0') ;
51
+ }
52
+
53
+ .p-request__close{
54
+ font-family: "use-SourceHanSansJP";
55
+ }
56
+
57
+ .p-request__close::before {
58
+ content: "\e91a";
59
+ font-family: "design_plus";
60
+ }
61
+ ```
62
+ 上記コードで解決しました!
46
63
  ### 補足情報(FW/ツールのバージョンなど)
47
64
  CSSがきいてない、というよりはリンクが切れているようで font-family: "design_plus";は読み込まれています。スマホやタブレットではウェブフォントが表示されます。
48
65
  どうかご助力お願いいたします。

2

同エラーコードを2つアップしていたので、一つ削除

2018/04/02 13:48

投稿

ami15821
ami15821

スコア56

title CHANGED
File without changes
body CHANGED
@@ -7,9 +7,6 @@
7
7
  ```ここに言語を入力
8
8
  Access to Font at 'http://ドメイン.ne.jp/wp/wp-content/themes/vogue_tcd051/assets/fonts/design_plus.woff?v=1.0' from origin 'http://www.ドメイン.co.jp' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.ドメイン.co.jp' is therefore not allowed access.
9
9
  ```
10
- ```ここに言語を入力
11
- Access to Font at 'http://ドメイン.ne.jp/wp/wp-content/themes/vogue_tcd051/assets/fonts/design_plus.ttf?v=1.0' from origin 'http://wwwドメイン.co.jp' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.ドメイン.co.jp' is therefore not allowed access.
12
- ```
13
10
  □ ←アイコンが□になってしまう
14
11
 
15
12
 

1

エラーメッセージの追記

2018/04/02 11:11

投稿

ami15821
ami15821

スコア56

title CHANGED
File without changes
body CHANGED
@@ -4,13 +4,22 @@
4
4
  使っているテーマ:vogue_tcd051
5
5
 
6
6
  ### 発生している問題・エラーメッセージ
7
+ ```ここに言語を入力
8
+ Access to Font at 'http://ドメイン.ne.jp/wp/wp-content/themes/vogue_tcd051/assets/fonts/design_plus.woff?v=1.0' from origin 'http://www.ドメイン.co.jp' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.ドメイン.co.jp' is therefore not allowed access.
9
+ ```
10
+ ```ここに言語を入力
11
+ Access to Font at 'http://ドメイン.ne.jp/wp/wp-content/themes/vogue_tcd051/assets/fonts/design_plus.ttf?v=1.0' from origin 'http://wwwドメイン.co.jp' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.ドメイン.co.jp' is therefore not allowed access.
12
+ ```
13
+ □ ←アイコンが□になってしまう
7
14
 
8
- □ ←アイコンが□になってしまっている
9
15
 
10
16
  ### 該当のソースコード
17
+ ```ここに言語を入力
11
18
  【HTML】
12
19
  <button id="js-request__close" class="p-request__close"></button>
20
+ ```
13
21
 
22
+ ```ここに言語を入力
14
23
  【CSS】
15
24
  .p-request__close {
16
25
  background: #000;
@@ -34,7 +43,7 @@
34
43
  content: "\e91a";
35
44
  font-family: "design_plus";
36
45
  }
37
-
46
+ ```
38
47
  ### 試したこと
39
48
  demoページのCSSのfont-family: "design_plus";をクロームの検証でチェックを外すとアイコンが『 □ 』になるのを確認。
40
49
  ### 補足情報(FW/ツールのバージョンなど)