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

質問編集履歴

1

不足大変失礼いたしました。コード(html/css/js)および開発環境を追加いたしました。よろしくお願いいたします。

2019/04/05 06:44

投稿

hayakawatakuma
hayakawatakuma

スコア21

title CHANGED
File without changes
body CHANGED
@@ -5,4 +5,496 @@
5
5
  こちらの表記を削除するにはどうしたらいいか教えて頂けますか?
6
6
 
7
7
  試したこと
8
- jsに関するエラーかと推測し、jsファイルを全て削除してみましたがダメでした。。
8
+ jsに関するエラーかと推測し、jsファイルを全て削除してみましたがダメでした。。
9
+
10
+
11
+ 追記-----------------------
12
+
13
+ 作業環境:gulp
14
+ PC:mac OS
15
+ 検証ブラウザ:Chrome
16
+
17
+ 自身のPCおよびChromeのコンソール画面にのみ(他のブラウザでは特に表示されず。)表示されるエラーでした。
18
+ (他の方のChromeのコンソール画面では表示されませんでした)
19
+
20
+
21
+
22
+ ```HTML
23
+ <!doctype html>
24
+ <html lang="ja">
25
+
26
+ <head>
27
+ <meta charset="utf-8">
28
+ <title>テスト</title>
29
+ <meta name="description" content="">
30
+ <meta name="keywords" content="">
31
+ <meta name="viewport" content="width=device-width">
32
+ <meta property="og:type" content="website">
33
+ <meta property="og:site_name" content="">
34
+ <meta property="og:url" content="[サイトURL絶対パス]">
35
+ <meta property="og:title" content="">
36
+ <meta property="og:description" content="">
37
+ <!-- ↓アイコン -->
38
+ <link rel="icon" type="image/x-icon" href="/shared/img/favicon.ico">
39
+ <!-- ↓stylesheets -->
40
+ <link rel="stylesheet" href="css/style.css">
41
+ <link rel="stylesheet" href="css/slick-theme.css">
42
+ <link rel="stylesheet" href="css/slick.css">
43
+ </head>
44
+
45
+ <body id="top">
46
+ <div class="container">
47
+ <!--#include virtual="shared/include/header.html"-->
48
+ <!--#include virtual="shared/include/side_menu.html"-->
49
+
50
+ <div class="bodyArea">
51
+ <!-- この中にコンテンツ -->
52
+ <main class="main_contants">
53
+ <section class="top-sec">
54
+ <div class="slick-slider">
55
+ <div><a href=""><img src="/shared/img/top/slide1.png" alt="スライド1"></a></div>
56
+ </div>
57
+ </section>
58
+
59
+ <section class="top-sec01">
60
+ <div class="section-in flex f-sb f-wp">
61
+ <div class="news-ttl-box">
62
+ <h2>新着情報<span>NEWS</span></h2>
63
+ </div>
64
+ <div class="news-list-box">
65
+ <a href="">
66
+ <dl>
67
+ <dt><time>2019.2</time>タイトル</dt>
68
+ <dd>テキストテキストテキストテキストテキストテキスト</dd>
69
+ </dl>
70
+ </a>
71
+
72
+ <p class="taC"><a href="" class="default-btn">ニュース一覧</a></p>
73
+ </div>
74
+ </div>
75
+ </section>
76
+
77
+ <section class="top-sec02">
78
+ <div class="section-in">
79
+ <ul class="flex f-sb f-wp">
80
+ <li><a href=""><img src="/shared/img/top/top_sec02_bnr1.jpg" alt=""></a></li>
81
+ <li><a href=""><img src="/shared/img/top/top_sec02_bnr2.jpg" alt=""></a></li>
82
+ <li><a href=""><img src="/shared/img/top/top_sec02_bnr3.jpg" alt=""></a></li>
83
+ </ul>
84
+ </div>
85
+ </section>
86
+ <!--#include virtual="shared/include/footer.html"-->
87
+ </main>
88
+ <!-- ここまでコンテンツ -->
89
+ </div><!-- /.bodyArea -->
90
+ </div><!-- /.container -->
91
+
92
+ <!-- ↓js -->
93
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
94
+ <script src="shared/js/slick.min.js"></script>
95
+ <script src="shared/js/common.js"></script>
96
+ </body>
97
+
98
+ </html>
99
+
100
+ ```
101
+
102
+ ```SASS
103
+
104
+
105
+ /*--------------------------------------------------------------
106
+ html/body
107
+ ---------------------------------------------------------------*/
108
+ * {
109
+ box-sizing: border-box;
110
+ }
111
+
112
+ html {
113
+ font-size: 62.5%;
114
+ }
115
+
116
+ body {
117
+ color: #333;
118
+ line-height: 1.2;
119
+ word-break: break-word;
120
+ width: 100%;
121
+ font-weight: 300;
122
+ font-size: 1.6rem;
123
+ letter-spacing: 0.01em;
124
+ }
125
+ /*------------------------------------------------------
126
+ ボタン
127
+ --------------------------------------------------------*/
128
+ .default-btn {
129
+ display: inline-block;
130
+ width: 300px;
131
+ text-align: center;
132
+ text-decoration: none;
133
+ outline: none;
134
+ height: 45px;
135
+ line-height: 43px;
136
+ transition: 0.3s;
137
+ background-color: #821717;
138
+ border: 2px solid #821717;
139
+ color: #fff;
140
+ border-radius: 50px;
141
+ position: relative;
142
+ font-weight: 600;
143
+
144
+ &:after {
145
+ content: "";
146
+ display: block;
147
+ width: 8px;
148
+ height: 8px;
149
+ border-top: 2px solid #fff;
150
+ border-right: 2px solid #fff;
151
+ transform: rotate(45deg);
152
+ position: absolute;
153
+ right: 25px;
154
+ top: calc(50% - 4px);
155
+ }
156
+
157
+ &:hover {
158
+ background-color: #fff;
159
+ border-color: #821717;
160
+ color: #821717;
161
+
162
+ &:after {
163
+ border-top: 2px solid #821717;
164
+ border-right: 2px solid #821717;
165
+ }
166
+ }
167
+ }
168
+ /*------------------------------------------------------
169
+ ホバーアクション
170
+ --------------------------------------------------------*/
171
+ a img {
172
+ transition: .2s;
173
+ }
174
+
175
+ a img:hover {
176
+ opacity: .6;
177
+ }
178
+ /*------------------------------------------------------
179
+
180
+ --------------------------------------------------------*/
181
+ .section-in {
182
+ max-width: 1200px;
183
+ width: 95%;
184
+ margin: 0 auto;
185
+ padding: 80px 0;
186
+ }
187
+
188
+ .main_contants > .section-in {
189
+ width: 95%;
190
+ padding: 80px 0 40px;
191
+ }
192
+
193
+ .main_contants {
194
+ left: 220px;
195
+ position: absolute;
196
+ width: calc(100% - 220px);
197
+ background: url(../../shared/img/under_bg1.jpg) no-repeat;
198
+ background-size: 100%;
199
+ background-position-x: right;
200
+ }
201
+ //--------------------------------------------------------------
202
+ // 1200px以上
203
+ //--------------------------------------------------------------
204
+ @include media(ll) {
205
+ .section-in {
206
+ width: 1200px;
207
+ min-width: 950px;
208
+ }
209
+ }
210
+ //--------------------------------------------------------------
211
+ // タブレット
212
+ //--------------------------------------------------------------
213
+ @include media(l) {
214
+ .section-in {
215
+ width: 95%;
216
+ }
217
+ }
218
+ //--------------------------------------------------------------
219
+ // スマートフォン
220
+ //--------------------------------------------------------------
221
+ @include media(s) {
222
+ .main_contants {
223
+ left: 0;
224
+ top: 65px;
225
+ width: 100%;
226
+ overflow: hidden;
227
+ }
228
+
229
+ .section-in {
230
+ width: 100%;
231
+ max-width: 100%;
232
+ min-width: 100%;
233
+ padding: 60px 20px;
234
+ }
235
+
236
+ .main_contants > .section-in {
237
+ padding: 60px 20px 0;
238
+ }
239
+ //スイッチ
240
+ .pc {
241
+ display: none;
242
+ }
243
+
244
+ .sp {
245
+ display: block;
246
+ }
247
+ //ボタン
248
+ .default-btn {
249
+ width: 100%;
250
+ }
251
+ //タイトル / テキスト
252
+ .heading-l {
253
+ font-size: 3rem;
254
+ padding-left: 25px;
255
+ top: -25px;
256
+
257
+ &:before {
258
+ height: 125px;
259
+ }
260
+ }
261
+
262
+ .heading-m {
263
+ margin-bottom: 40px;
264
+ }
265
+
266
+ .default-txt {
267
+ text-align: justify;
268
+ }
269
+ }
270
+
271
+ /*--------------------------------------------------------------
272
+ TOP-CSS
273
+ ---------------------------------------------------------------*/
274
+
275
+
276
+ .under-bottom-img {
277
+ position: relative;
278
+ bottom: -90px;
279
+ max-width: 1200px;
280
+ margin: -100px auto 0;
281
+ }
282
+
283
+ #top {
284
+
285
+ .main_contants {
286
+ background: none;
287
+ }
288
+
289
+ .under-top-img {
290
+ display: none;
291
+ }
292
+
293
+ .top-sec {
294
+ .top-sec-bg {
295
+ position: absolute;
296
+ top: 0;
297
+ left: 0;
298
+ width: 30%;
299
+ z-index: -1;
300
+ }
301
+ }
302
+ //top-sec01-----------------
303
+ .top-sec01 {
304
+ background: url("../../shared/img/top/top_sec01_bg.jpg") no-repeat;
305
+
306
+ .news-ttl-box {
307
+ background: #fff;
308
+ width: 18%;
309
+ color: #7bb8fb;
310
+ padding: 1.6em;
311
+ min-height: 150px;
312
+ height: 100%;
313
+
314
+ h2 {
315
+ font-size: 2.2rem;
316
+ font-weight: bold;
317
+ span {
318
+ display: block;
319
+ margin-top: 5px;
320
+ }
321
+ }
322
+ }
323
+
324
+ .news-list-box {
325
+ width: 79%;
326
+ background: rgba(255,255,255,.7);
327
+ padding: 30px 40px;
328
+
329
+ dl {
330
+ border-bottom: 1px solid #a3a3a3;
331
+ padding-bottom: 20px;
332
+ margin-bottom: 20px;
333
+
334
+ dt {
335
+ color: #821717;
336
+ width: calc(100% - 70px);
337
+ font-weight: bold;
338
+
339
+ time {
340
+ width: 70px;
341
+ display: inline-block;
342
+ }
343
+
344
+ &::after {
345
+ content: '';
346
+ display: inline-block;
347
+ width: 20px;
348
+ height: 20px;
349
+ background-image: url("../../shared/img/top/news_arrow.png");
350
+ background-size: contain;
351
+ vertical-align: middle;
352
+ margin: -3px 0 0 7px;
353
+ }
354
+ }
355
+
356
+ dd {
357
+ margin-top: 10px;
358
+ margin-left: 70px;
359
+ }
360
+ }
361
+ }
362
+ }
363
+ //top-sec02------------------
364
+ .top-sec02 {
365
+ ul {
366
+ li {
367
+ width: 49%;
368
+
369
+ &:last-child {
370
+ width: 100%;
371
+ margin-top: 1.5em;
372
+ }
373
+ }
374
+ }
375
+ }
376
+ }
377
+ //--------------------------------------------------------------
378
+ // スマートフォン
379
+ //--------------------------------------------------------------
380
+ @include media(s) {
381
+ .under-top-img {
382
+ max-width: 100%;
383
+ }
384
+
385
+ .under-bottom-img {
386
+ bottom: 0;
387
+ margin-top: 0;
388
+ max-width: 100%;
389
+ }
390
+
391
+ #top {
392
+ //top-sec01-----------------
393
+ .top-sec01 {
394
+ background-size: cover;
395
+
396
+ .news-ttl-box {
397
+ width: 50%;
398
+ margin: 0 auto 20px;
399
+ height: auto;
400
+ min-height: auto;
401
+ background: none;
402
+ text-align: center;
403
+ padding: 0;
404
+ color: #fff;
405
+ }
406
+
407
+ .news-list-box {
408
+ width: 100%;
409
+ padding: 20px;
410
+ margin-top: 20px;
411
+
412
+ dl {
413
+ dt {
414
+ width: 100%;
415
+ }
416
+
417
+ dd {
418
+ margin-left: 0;
419
+ line-height: 1.4em;
420
+ }
421
+ }
422
+ }
423
+
424
+ .section-in {
425
+ padding: 60px 20px;
426
+ }
427
+ }
428
+ //top-sec02------------------
429
+ .top-sec02 {
430
+ ul {
431
+ li {
432
+ width: 80%;
433
+ margin: 0 auto 25px;
434
+
435
+ &:last-child {
436
+ margin-top: 0;
437
+ }
438
+ }
439
+ }
440
+ }
441
+
442
+ .under-img-area {
443
+ bottom: 0;
444
+ margin-top: -120px;
445
+ }
446
+ }
447
+ }
448
+
449
+ ```
450
+
451
+
452
+ ```js
453
+
454
+ $(function() {
455
+
456
+
457
+
458
+ // ハンバーガーメニュー開閉
459
+ $(".menu-mobile").click(function(e) {
460
+ $(".global_navi").toggleClass('show-on-mobile');
461
+ e.preventDefault();
462
+ });
463
+ $('.menu-mobile').on('click', function() {
464
+ $(this).toggleClass('menu-active');
465
+ return false;
466
+ });
467
+ // closeボタンで閉じる
468
+ $(".menu_close").on('click', function() {
469
+ if ($(window).width() <= 767) {
470
+ $('.menu-mobile').removeClass('menu-active');
471
+ $('.global_navi').removeClass('show-on-mobile');
472
+ }
473
+ });
474
+
475
+
476
+ // サブメニューボタン開閉
477
+ $(".sub_switch > a > span").click(function(e) {
478
+ if ($(window).width() <= 767) {
479
+ $(this).parents('.sub_switch').children("ul").fadeToggle(150);
480
+ $(this).parents('.sub_switch').toggleClass('menu-open');
481
+ return false;
482
+ }
483
+ });
484
+
485
+ //スムーススクロール
486
+ var headerHight = 100;
487
+ $('a[href^="#"]').on('click', function() {
488
+ var speed = 500;
489
+ var href = $(this).attr("href");
490
+ var target = $(href == "#" || href == "" ? 'html' : href);
491
+ var position = target.offset().top - headerHight;
492
+ $('body,html').animate({
493
+ scrollTop: position
494
+ }, speed, 'swing');
495
+ return false;
496
+ });
497
+
498
+ });
499
+
500
+ ```