質問編集履歴

3

指摘を受けたため

2020/07/03 15:12

投稿

Yuto1800
Yuto1800

スコア6

test CHANGED
File without changes
test CHANGED
@@ -18,6 +18,10 @@
18
18
 
19
19
 
20
20
 
21
+
22
+
23
+ <!DOCTYPE html>
24
+
21
25
  <html lang="ja" dir="ltr">
22
26
 
23
27
  <head>
@@ -30,17 +34,45 @@
30
34
 
31
35
  <link rel="stylesheet" href="style.css">
32
36
 
33
- <link href="https://use.fontawesome.com/releases/v5.6.1/css/all.css" rel="stylesheet">
34
-
35
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome-animation/0.0.10/font-awesome-animation.css" type="text/css" media="all" />
36
-
37
37
  </head>
38
38
 
39
39
  <body>
40
40
 
41
+
42
+
43
+ <!-- ヘッダー -->
44
+
45
+ <header>
46
+
47
+
48
+
49
+ </header>
50
+
51
+
52
+
53
+ <!-- プロフィール -->
54
+
55
+ <div class="heading-txt">
56
+
57
+ <h2><i class="fas fa-user"></i> PROFILE</h2>
58
+
59
+ </div>
60
+
61
+
62
+
63
+
64
+
65
+ <!-- スキル -->
66
+
67
+ <div class="skills heading-txt">
68
+
69
+ <h2><i class="fas fa-wrench"></i> SKILLS</h2>
70
+
71
+ </div>
72
+
41
-    <div class="container" id="scene-2-content">
73
+ <div class="container" id="scene-2-content">
42
-
74
+
43
- <div class="skill-wrapper" id="skill-scroll">
75
+ <div class="skill-wrapper">
44
76
 
45
77
  <div class="skill-item">
46
78
 
@@ -92,13 +124,469 @@
92
124
 
93
125
  </div>
94
126
 
127
+ <!-- パイチャートここまで -->
128
+
129
+ <div class="skill-txt">
130
+
131
+ <h3 class="html-color">HTML</h3>
132
+
133
+ <p>SEOを考慮し、見やすく、後から編集しやすいコーディングをします。</p>
134
+
135
+ </div>
136
+
95
137
  </div>
96
138
 
139
+ <div class="skill-item">
140
+
141
+ <div class="charts">
142
+
143
+ <div class="chart" id="pi-css">
144
+
145
+ <div class="circle-mask-outer left">
146
+
147
+ <div class="circle-mask-inner">
148
+
149
+ <div class="circle-body"></div>
150
+
151
+ </div>
152
+
153
+ </div>
154
+
155
+ <div class="circle-mask-outer right">
156
+
157
+ <div class="circle-mask-inner">
158
+
159
+ <div class="circle-body"></div>
160
+
161
+ </div>
162
+
163
+ </div>
164
+
165
+ <div class="chart-content">
166
+
167
+ <p class="text">
168
+
169
+ <i class="fab fa-css3-alt fa-2x css-color"></i>
170
+
171
+ <div class="percent">
172
+
173
+ <span class="percent-number">70</span>
174
+
175
+ <span class="percent-symbol">%</span>
176
+
177
+ </div>
178
+
179
+ </p>
180
+
181
+ </div>
182
+
183
+ </div>
184
+
185
+ </div>
186
+
187
+ <div class="skill-txt">
188
+
189
+ <h3 class="css-color">CSS</h3>
190
+
191
+ <p>後から編集しやすく、パーフェクトピクセルを意識して綺麗にコーディングをします</p>
192
+
193
+ </div>
194
+
195
+ </div>
196
+
97
197
  </div>
98
198
 
99
199
  </div>
100
200
 
201
+ <!-- フッター -->
202
+
203
+ <footer>
204
+
205
+ <p><small>&copy; 2020 / Yuto Nagayoshi / All Rights Reserved.</small></p>
206
+
207
+ </footer>
208
+
209
+
210
+
211
+
212
+
213
+ <!-- JavaScriptファイル -->
214
+
215
+ <script src="js/jquery-3.5.1.min.js"></script>
216
+
217
+ <script src="js/script.js"></script>
218
+
101
-  </body>
219
+ </body>
220
+
221
+ </html>
222
+
223
+
224
+
225
+ cssのコード
226
+
227
+
228
+
229
+
230
+
231
+ @charset "utf-8";
232
+
233
+
234
+
235
+
236
+
237
+ /* 共通 */
238
+
239
+ body {
240
+
241
+ width: 100vw;
242
+
243
+ color: #5fc1c7;
244
+
245
+ background-color: #000000;
246
+
247
+ font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
248
+
249
+ }
250
+
251
+
252
+
253
+ a {
254
+
255
+ text-decoration: none;
256
+
257
+ }
258
+
259
+
260
+
261
+ .container {
262
+
263
+ width: 90%;
264
+
265
+ margin: 100px auto;
266
+
267
+ max-width: 1200px;
268
+
269
+ }
270
+
271
+
272
+
273
+ .heading-txt {
274
+
275
+ background-color: #1d4763;
276
+
277
+ border-top: #e6e500 dotted 5px;
278
+
279
+ border-bottom: #e6e500 dotted 5px;
280
+
281
+ height: 1800px;
282
+
283
+ width: 100vw;
284
+
285
+ h2 {
286
+
287
+ text-align: center;
288
+
289
+ color: #e6e500;
290
+
291
+ line-height: 180px;
292
+
293
+ font-size: 45px;
294
+
295
+ font-weight: 500;
296
+
297
+ letter-spacing: 3px;
298
+
299
+ }
300
+
301
+ }
302
+
303
+
304
+
305
+
306
+
307
+
308
+
309
+ /* スキル */
310
+
311
+ .skill-item {
312
+
313
+ display: flex;
314
+
315
+ margin-top: 10px;
316
+
317
+ }
318
+
319
+
320
+
321
+ .skill-wrapper {
322
+
323
+ margin: 0 15%;
324
+
325
+ }
326
+
327
+
328
+
329
+ .skill-txt {
330
+
331
+ margin-left: 25px;
332
+
333
+ margin-top: 10px;
334
+
335
+ h3 {
336
+
337
+ font-size: 25px;
338
+
339
+ }
340
+
341
+ p {
342
+
343
+ margin-top: 10px;
344
+
345
+ letter-spacing: 1;
346
+
347
+ color: #ffffff;
348
+
349
+ }
350
+
351
+ }
352
+
353
+
354
+
355
+
356
+
357
+ /* フッター */
358
+
359
+ footer {
360
+
361
+ height: 150px;
362
+
363
+ background-color: #1d4763;
364
+
365
+ p {
366
+
367
+ text-align: center;
368
+
369
+ line-height: 150px;
370
+
371
+ }
372
+
373
+ }
374
+
375
+
376
+
377
+
378
+
379
+ /* パイチャート */
380
+
381
+ .chart {
382
+
383
+ position: relative;
384
+
385
+ width: 80px;
386
+
387
+ height: 80px;
388
+
389
+ }
390
+
391
+
392
+
393
+ .circle-mask-outer, .circle-mask-inner {
394
+
395
+ overflow: hidden;
396
+
397
+ position: absolute;
398
+
399
+ width: 40px;
400
+
401
+ height: 80px;
402
+
403
+ }
404
+
405
+
406
+
407
+ .circle-mask-outer.left {
408
+
409
+ left: 0;
410
+
411
+ }
412
+
413
+
414
+
415
+ .circle-mask-outer.right {
416
+
417
+ right: 0;
418
+
419
+ }
420
+
421
+
422
+
423
+ .circle-mask-inner {
424
+
425
+ -webkit-transform: rotate(0);
426
+
427
+ -ms-transform: rotate(0);
428
+
429
+ transform: rotate(0);
430
+
431
+ }
432
+
433
+
434
+
435
+ .circle-mask-outer.left {
436
+
437
+ .circle-mask-inner {
438
+
439
+ left: 100%;
440
+
441
+ -webkit-transform-origin: 0 50%;
442
+
443
+ -ms-transform-origin: 0 50%;
444
+
445
+ transform-origin: 0 50%;
446
+
447
+ }
448
+
449
+ }
450
+
451
+
452
+
453
+ .circle-mask-outer.right {
454
+
455
+ .circle-mask-inner {
456
+
457
+ right: 100%;
458
+
459
+ -webkit-transform-origin: 100% 50%;
460
+
461
+ -ms-transform-origin: 100% 50%;
462
+
463
+ transform-origin: 100% 50%;
464
+
465
+ }
466
+
467
+ }
468
+
469
+
470
+
471
+ .circle-body {
472
+
473
+ border-radius: 50%;
474
+
475
+ position: absolute;
476
+
477
+ width: 80px;
478
+
479
+ height: 80px;
480
+
481
+ }
482
+
483
+
484
+
485
+ .circle-mask-outer.left {
486
+
487
+ .circle-body {
488
+
489
+ right: 0;
490
+
491
+ }
492
+
493
+ }
494
+
495
+
496
+
497
+ .circle-mask-outer.right {
498
+
499
+ .circle-body {
500
+
501
+ left: 0;
502
+
503
+ }
504
+
505
+ }
506
+
507
+
508
+
509
+ .chart-content {
510
+
511
+ position: absolute;
512
+
513
+ top: 9px;
514
+
515
+ left: 8px;
516
+
517
+ width: 63px;
518
+
519
+ height: 63px;
520
+
521
+ background-color: #fff;
522
+
523
+ border-radius: 50%;
524
+
525
+ text-align: center;
526
+
527
+ .text {
528
+
529
+ display: flex;
530
+
531
+ flex-direction: column;
532
+
533
+ padding-top: 5px;
534
+
535
+ }
536
+
537
+ }
538
+
539
+
540
+
541
+ .percent {
542
+
543
+ span {
544
+
545
+ color: #000000;
546
+
547
+ }
548
+
549
+ }
550
+
551
+
552
+
553
+ #pi-html {
554
+
555
+ .circle-body {
556
+
557
+ background-color: #00a040;
558
+
559
+ }
560
+
561
+ }
562
+
563
+
564
+
565
+ .html-color {
566
+
567
+ color: #00a040;
568
+
569
+ }
570
+
571
+
572
+
573
+ #pi-css {
574
+
575
+ .circle-body {
576
+
577
+ background-color: #e6191c;
578
+
579
+ }
580
+
581
+ }
582
+
583
+
584
+
585
+ .css-color {
586
+
587
+ color: #e6191c;
588
+
589
+ }
102
590
 
103
591
 
104
592
 
@@ -189,13 +677,3 @@
189
677
  });
190
678
 
191
679
  });
192
-
193
-
194
-
195
-
196
-
197
- ![イメージ説明](a1b243bd2d71b40c5095f6b0167121d4.png)
198
-
199
-
200
-
201
- ![イメージ説明](90fa590ef078fd01d089ae3a115174dc.png)

2

指摘を受けたため

2020/07/03 15:12

投稿

Yuto1800
Yuto1800

スコア6

test CHANGED
File without changes
test CHANGED
@@ -14,6 +14,182 @@
14
14
 
15
15
 
16
16
 
17
+ htmlのソースコード
18
+
19
+
20
+
21
+ <html lang="ja" dir="ltr">
22
+
23
+ <head>
24
+
25
+ <meta charset="utf-8">
26
+
27
+ <title>Yuto's Room</title>
28
+
29
+ <link rel="stylesheet" href="reset.css">
30
+
31
+ <link rel="stylesheet" href="style.css">
32
+
33
+ <link href="https://use.fontawesome.com/releases/v5.6.1/css/all.css" rel="stylesheet">
34
+
35
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome-animation/0.0.10/font-awesome-animation.css" type="text/css" media="all" />
36
+
37
+ </head>
38
+
39
+ <body>
40
+
41
+    <div class="container" id="scene-2-content">
42
+
43
+ <div class="skill-wrapper" id="skill-scroll">
44
+
45
+ <div class="skill-item">
46
+
47
+ <!-- パイチャート -->
48
+
49
+ <div class="charts">
50
+
51
+ <div class="chart" id="pi-html">
52
+
53
+ <div class="circle-mask-outer left">
54
+
55
+ <div class="circle-mask-inner">
56
+
57
+ <div class="circle-body"></div>
58
+
59
+ </div>
60
+
61
+ </div>
62
+
63
+ <div class="circle-mask-outer right">
64
+
65
+ <div class="circle-mask-inner">
66
+
67
+ <div class="circle-body"></div>
68
+
69
+ </div>
70
+
71
+ </div>
72
+
73
+ <div class="chart-content">
74
+
75
+ <p class="text">
76
+
77
+ <i class="fab fa-html5 fa-2x html-color"></i>
78
+
79
+ <div class="percent">
80
+
81
+ <span class="percent-number">70</span>
82
+
83
+ <span class="percent-symbol">%</span>
84
+
85
+ </div>
86
+
87
+ </p>
88
+
89
+ </div>
90
+
91
+ </div>
92
+
93
+ </div>
94
+
95
+ </div>
96
+
97
+ </div>
98
+
99
+ </div>
100
+
101
+  </body>
102
+
103
+
104
+
105
+
106
+
107
+ jsのソースコード
108
+
109
+
110
+
111
+
112
+
113
+ $(function(){
114
+
115
+ /* 回転アニメーションのやつ */
116
+
117
+ function activateScene2() {
118
+
119
+ var $content = $('#scene-2-content'),
120
+
121
+ $charts = $content.find('.chart');
122
+
123
+
124
+
125
+ $charts.each(function() {
126
+
127
+ var $chart = $(this),
128
+
129
+ $circleLeft = $chart.find('.left .circle-mask-inner').css({transform: 'rotate(0)'}),
130
+
131
+ $circleRight = $chart.find('.right .circle-mask-inner').css({transform: 'rotate(0)'}),
132
+
133
+ $percentNumber = $chart.find('.percent-number'),
134
+
135
+ percentData = $percentNumber.text();
136
+
137
+ $percentNumber.text(0);
138
+
139
+
140
+
141
+ $({percent: 0}).delay(1000).animate({percent: percentData}, {duration: 1500, progress: function() {
142
+
143
+ var now = this.percent,
144
+
145
+ deg = now * 360 / 100,
146
+
147
+ degRight = Math.min(Math.max(deg, 0), 180),
148
+
149
+ degLeft = Math.min(Math.max(deg - 180, 0), 180);
150
+
151
+ $circleRight.css({transform: 'rotate(' + degRight + 'deg)'});
152
+
153
+ $circleLeft.css({transform: 'rotate(' + degLeft +'deg)'});
154
+
155
+ $percentNumber.text(Math.floor(now));
156
+
157
+ }});
158
+
159
+ });
160
+
161
+ }
162
+
163
+
164
+
165
+ /* スクロールしたらアニメーションのやつ */
166
+
167
+ $(window).on('scroll', function() {
168
+
169
+ var $skillScroll = $('#skill-scroll');
170
+
171
+
172
+
173
+ $skillScroll.each(function() {
174
+
175
+ var skillOffset = $(this).offset().top,
176
+
177
+ scrollPos = $(window).scrollTop();
178
+
179
+
180
+
181
+ if(scrollPos > skillOffset) {
182
+
183
+ $(this).activateScene2();
184
+
185
+ }
186
+
187
+ });
188
+
189
+ });
190
+
191
+ });
192
+
17
193
 
18
194
 
19
195
 

1

結果的にどうしたいかを追加しました

2020/07/03 14:17

投稿

Yuto1800
Yuto1800

スコア6

test CHANGED
File without changes
test CHANGED
@@ -10,6 +10,10 @@
10
10
 
11
11
 
12
12
 
13
+ 理想としては、スクロールで可視範囲に入ったら、activateScene2 という関数を実行できるようにタイミングを設定するようなプログラムを組みたいです。
14
+
15
+
16
+
13
17
 
14
18
 
15
19