質問編集履歴

2

コードの修正

2016/06/16 06:52

投稿

LanHma
LanHma

スコア192

test CHANGED
File without changes
test CHANGED
@@ -1,4 +1,8 @@
1
+ 内容を修正致しました。わかりづらく申し訳ございません。
2
+
1
3
  いつもお世話になっております。どうかご教授下さい。
4
+
5
+
2
6
 
3
7
 
4
8
 
@@ -8,20 +12,100 @@
8
12
 
9
13
  ```html
10
14
 
11
- <svg "width="1020px" height="400px">
15
+ <div class="gradient_bg mask">
12
16
 
13
- <clipPath id="svgPath">
17
+ </div>
14
18
 
15
- <text x="100" y="100" textLength="700" font-family="sans-serif" font-size="150px"font-style="italic"font-weight="bold">HOGE</text>
19
+ <svg>
16
20
 
21
+ <clipPath id="svgPath">
22
+
23
+ <text x="300" y="300" textLength="700" font-family="sans-serif" font-size="150px"font-style="italic"font-weight="bold">HOGE</text>
24
+
17
- </clipPath>
25
+ </clipPath>
18
26
 
19
27
  </svg>
28
+
29
+ </body>
30
+
31
+
20
32
 
21
33
  ```
22
34
 
23
35
 
24
36
 
25
- 1020pxの間で中央揃えにしたいのですが、何か良い方法はないでしょうか?
37
+ ```css
26
38
 
39
+ .gradient_bg{
40
+
41
+ width: 1020px;
42
+
43
+ height: 400px;
44
+
45
+ margin: 0 auto;
46
+
47
+ background: linear-gradient(270deg, #3fb1d3, #ffffff);
48
+
49
+ background-size: 600% 600%;
50
+
51
+
52
+
53
+ -webkit-animation: AnimationName 15s ease infinite;
54
+
55
+ -moz-animation: AnimationName 15s ease infinite;
56
+
57
+ animation: AnimationName 15s ease infinite;
58
+
59
+
60
+
61
+ @-webkit-keyframes AnimationName {
62
+
63
+ 0%{background-position:0% 50%}
64
+
65
+ 50%{background-position:100% 50%}
66
+
67
+ 100%{background-position:0% 50%}
68
+
69
+ }
70
+
71
+ @-moz-keyframes AnimationName {
72
+
73
+ 0%{background-position:0% 50%}
74
+
75
+ 50%{background-position:100% 50%}
76
+
77
+ 100%{background-position:0% 50%}
78
+
79
+ }
80
+
81
+ @keyframes AnimationName {
82
+
83
+ 0%{background-position:0% 50%}
84
+
85
+ 50%{background-position:100% 50%}
86
+
87
+ 100%{background-position:0% 50%}
88
+
89
+ }
90
+
91
+ }
92
+
93
+
94
+
95
+ .mask {
96
+
97
+ -webkit-clip-path: url(#svgPath);
98
+
99
+ clip-path: url(#svgPath);
100
+
101
+ }
102
+
103
+ ```
104
+
105
+
106
+
107
+ やりたいことはグラデーションをマスクしたSVGテキストを1020pxの間でセンタ揃えにしたいという事になります。
108
+
109
+ 説明不足で大変申し訳ございません。
110
+
27
- 大変お手数をお掛けしますがご教授のほど宜しくお願いいたします。
111
+ どうぞご教授お願いいたします。

1

文言の修正

2016/06/16 06:52

投稿

LanHma
LanHma

スコア192

test CHANGED
File without changes
test CHANGED
@@ -12,7 +12,7 @@
12
12
 
13
13
  <clipPath id="svgPath">
14
14
 
15
- <text x="100" y="100" textLength="700" font-family="sans-serif" font-size="150px"font-style="italic"font-weight="bold">RECRUIT</text>
15
+ <text x="100" y="100" textLength="700" font-family="sans-serif" font-size="150px"font-style="italic"font-weight="bold">HOGE</text>
16
16
 
17
17
  </clipPath>
18
18