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

質問編集履歴

1

修正依頼により、問題の発現を確認した後コードを再掲いたしました。 この度は、貴重なお時間をいただきまして大変申し訳ございませんでした。

2021/03/13 03:20

投稿

s230213
s230213

スコア1

title CHANGED
File without changes
body CHANGED
@@ -13,6 +13,36 @@
13
13
  ### 該当のソースコード
14
14
 
15
15
  ```HTML
16
+ <!doctype html>
17
+ <html>
18
+ <head>
19
+ <meta charset="UTF-8">
20
+ <meta name="viewport" content="width=device-width,initial-scale=1">
21
+ <link rel="stylesheet" href="animate.min.css"/>
22
+ <link rel="stylesheet" href="stylecopy.css">
23
+ <script type="text/javascript" src="common/js/jquery-3.5.1.min.js"></script>
24
+ <script src="wow.js"></script>
25
+ <script>new WOW().init();
26
+ </script>
27
+ <script type="text/javascript" src="program.js"></script>
28
+
29
+ <title>Casablanca</title>
30
+ </head>
31
+
32
+ <body>
33
+ <div id="index">
34
+ <div class="slide-wrap">
35
+ <div class="slide" id="makeImg">
36
+
37
+ <img class="slide-item" src="images/topimage.jpg" alt="コーヒーの写真">
38
+ <img class="slide-item" src="images/cafe.jpg" alt="店内">
39
+ <img class="slide-item" src="images/cofeeandbook.jpg" alt="コーヒーと本の写真">
40
+ </div>
41
+ </div>
42
+ </div>
43
+ <header>
44
+ <img class="logo" src="images/logo.svg" alt="Casablance" title="カサブランカ">
45
+ </header>
16
46
  <div class="drawer">
17
47
  <input type="checkbox" id="drawer-check" class="drawer-hidden" >
18
48
 
@@ -20,27 +50,27 @@
20
50
 
21
51
  <label for="drawer-check" class="drawer-close"></label>
22
52
    <nav class="drawer-content">
23
- <ul class="drawer-list">
53
+ <ul class="drawer-list">
24
54
  <li class="drawer-item"><a href="#index">Top</a></li>
25
55
  <li class="drawer-item"><a href="#About">About</a></li>
26
56
  <li class="drawer-item"><a href="#Menu">Menu</a></li>
27
57
  <li class="drawer-item"><a href="#Access">Access</a></li>
28
58
  </ul>
29
- </nav>
59
+ </nav>
30
- </div>
60
+ </div>
31
61
 
32
62
 
33
63
  <div id="About">
34
- <h2 class="wow animate__animated animate__flipInX index_name">About</h2>
64
+ <h2 class="wow animate__animated animate__flipInX index_name">About</h2>
35
65
  <div class="About_box">
36
66
  <div class="dripcoffee_box">
37
67
  <div class="wow animate__animated animate__fadeInRight dripcoffee">
38
68
  <img src="images/About1.jpg" alt="ドリップしているコーヒーの写真" title="手作りコーヒー">
39
69
  </div>
40
- <div class="wow animate__animated animate__fadeInLeft dripcoffee_index">
70
+ <div class="wow animate__animated animate__fadeInLeft dripcoffee_index">
41
- <h3>ウィーンで修行した<br class="br-sp" />マスターこだわりの一杯</h3></div>
71
+ <h3>ウィーンで修行した<br class="br-sp" />マスターこだわりの一杯</h3></div>
42
72
  <div class="wow animate__animated animate__fadeInUp dripcoffee_text">
43
- <br class="br-sp" />カフェ文化が世界遺産となっている
73
+ <br class="br-sp" />カフェ文化が世界遺産となっている
44
74
  <br class="br-sp" />オーストリア、ウィーンで修行を重ねた
45
75
  <br class="br-sp" />マスターの味わい深いコーヒーが特徴です。
46
76
  <br class="br-sp" />繁華街を小道一本挟んだ落ち着いた場所
@@ -50,20 +80,97 @@
50
80
  <div class="wow animate__animated animate__fadeInLeft orange">
51
81
  <p><img src="images/orange.jpg" alt="オレンジゼリーの写真" title="オレンジゼリー"></p>
52
82
  </div>
53
- <div class="wow animate__animated animate__fadeInLeft orange_index">
83
+ <div class="wow animate__animated animate__fadeInLeft orange_index">
54
- <h3>こだわりの一杯に<br class="br-sp" />出来立てのスイーツを添えて</h3></div>
84
+ <h3>こだわりの一杯に<br class="br-sp" />出来立てのスイーツを添えて</h3></div>
55
- <div class="wow animate__animated animate__fadeInUp orange_text">
85
+ <div class="wow animate__animated animate__fadeInUp orange_text">
56
- <br class="br-sp" />開店前早朝から心込めて仕込む
86
+ <br class="br-sp" />開店前早朝から心込めて仕込む
57
87
  <br class="br-sp" />マスターの絶品スイーツもご用意しております。
58
88
  <br class="br-sp" />お客様が選んだコーヒーと相性のいいスイーツを
59
89
  <br class="br-sp" />マスターからご提案も可能です。
60
90
  <br class="br-sp" />本日のコーヒーとスイーツセットでは
61
91
  <br class="br-sp" />マスターが考えた組み合わせを提供致します。
62
- </div></div></div></div>
92
+ </div></div></div></div>
63
-
93
+ </body></html>
64
94
  ```
65
95
 
66
96
  ```CSS
97
+ @charset "UTF-8";
98
+ /* CSS Document */
99
+ .logo{
100
+ display: block;
101
+ width: 100%;
102
+ background-color: #dc5f36;
103
+
104
+ }
105
+ .slide {
106
+ position : relative;
107
+ overflow : hidden;
108
+ width : 480px;
109
+ height : 726px;
110
+ margin : auto; /* サンプルは中央寄せの背景:白 */
111
+ background : #fff;
112
+ }
113
+ .slide-wrap{
114
+ width:100%;
115
+ height: auto;
116
+ }
117
+
118
+ /*=== 画像の設定 ======================================= */
119
+ .slide img {
120
+ display : block;
121
+ position : absolute;
122
+ width : inherit;
123
+ height : inherit;
124
+ left : 100%;
125
+ animation : slideAnime 12s ease infinite;
126
+ }
127
+
128
+ /*=== スライドのアニメーションを段差で開始する ========= */
129
+ .slide img:nth-of-type(1) { animation-delay: 0s }
130
+ .slide img:nth-of-type(2) { animation-delay: 4s }
131
+ .slide img:nth-of-type(3) { animation-delay: 8s }
132
+
133
+ /*=== スライドのアニメーション ========================= */
134
+ @keyframes slideAnime{
135
+ 0% { left: 100% }
136
+ 3% { left: 0 }
137
+ 30% { left: 0 }
138
+ 33% { left: -100% }
139
+ 100% { left: -100% }
140
+ }
141
+ header{
142
+ position: absolute;
143
+ top: -20px;
144
+ left: -186px;
145
+ width: 220px;
146
+ height: 260px;
147
+ display:block;
148
+ transform: rotate(90deg);
149
+ }
150
+ .drawer-hidden {
151
+ display: none;
152
+ }
153
+ .drawer{
154
+ position: fixed;
155
+ width:100%;
156
+ height: 70px;
157
+ }
158
+ /* ハンバーガーアイコンの設置スペース */
159
+ .drawer-open {
160
+ position: absolute;
161
+ background-color: #dc5f36;
162
+ display: flex;
163
+ height: 60px;
164
+ width: 60px;
165
+ top: -730px;
166
+ right: 0;
167
+ justify-content: center;
168
+ align-items: center;
169
+ z-index: 98;
170
+ cursor: pointer;
171
+ }
172
+
173
+ /* ハンバーガーメニューのアイコン */
67
174
  .drawer-open span,
68
175
  .drawer-open span:before,
69
176
  .drawer-open span:after {
@@ -121,7 +228,41 @@
121
228
  #drawer-check:checked ~ .drawer-close {
122
229
  left: 0;/* 閉じるための要素を画面内へ */
123
230
  }
124
- 中略
231
+ a{
232
+ color:inherit;
233
+ text-decoration: none;
234
+ outline: none;
235
+ }
236
+ ul{
237
+ list-style: none;
238
+ }
239
+ body{
240
+ position: relative;
241
+ font-family: "Noto Sans JP", "Noto Sans CJK JP", "Noto Sans Japanese", "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN W3", "ヒラギノ角ゴシック", "Hiragino Sans", "メイリオ", "Meiryo", "MS Pゴシック", "MS PGothic", sans-serif;
242
+ background-color: #70372c;
243
+ color: #f7e3af;
244
+ margin: 0;
245
+ }
246
+ .index_name{
247
+ animation: flipInX;
248
+ margin: auto;
249
+ animation-duration: 0.5s;
250
+ text-align: center;
251
+ font-size: 300%;
252
+ line-height: 150%;
253
+ background-color: #dc5f36;
254
+ color: #f7e3af;
255
+ }
256
+ .subindex_name{
257
+ animation: flipInX;
258
+ margin: auto;
259
+ animation-duration: 0.5s;
260
+ text-align: center;
261
+ font-size: 200%;
262
+ line-height: 150%;
263
+ background-color: #f7e3af;
264
+ color: #70372c;
265
+ }
125
266
  .About_box{
126
267
  margin: 0 auto;
127
268
  z-index: 10;
@@ -209,11 +350,6 @@
209
350
  padding: 1px 10px;
210
351
  z-index: 1;
211
352
  }
212
- .menu_box{
213
- position: relative;
214
- width: 100%;
215
- z-index: 1;
216
- }
217
353
 
218
354
  ```
219
355
  ```JavaScript
@@ -243,4 +379,5 @@
243
379
 
244
380
  ### 試したこと
245
381
 
246
- CSSにてz-index: 0;やz-index: 1;を書いて重なり順を指定してみましたが、画像の下に隠れたままです。
382
+ CSSにてz-index: 0;やz-index: 1;を書いて重なり順を指定してみましたが、画像の下に隠れたままです。
383
+ Safari Chorome Firefox のブラウザで同様の問題を確認しております。