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

質問編集履歴

1

追記

2023/06/26 06:24

投稿

eripakaxxx
eripakaxxx

スコア1

title CHANGED
File without changes
body CHANGED
@@ -8,34 +8,150 @@
8
8
  ### 該当のソースコード
9
9
 
10
10
  ```HTML
11
+ <!DOCTYPE html>
12
+ <html lang="ja">
13
+ <head>
14
+ <meta charset="UTF-8">
15
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
16
+ <title>HP</title>
17
+ <link rel="stylesheet" href="css/style.css">
18
+ <link rel="preconnect" href="https://fonts.googleapis.com">
19
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
20
+ <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+JP&display=swap" rel="stylesheet">
21
+ <link rel="stylesheet" href="./css/animsition.min.css">
22
+ </head>
11
23
  <body>
12
24
  <div class="animsition container">
13
25
  <header class="item">
26
+ <div class="menu">
27
+ <div class="logo">
28
+ <a href="#"><h1><img src="./img/w.png" alt="ロゴ"></h1></a>
29
+ </div>
30
+ <nav class="nav-list">
14
- ...
31
+ <ul>
32
+ <li>
33
+ <a href="#news">お知らせ</a>
34
+ </li>
35
+ <li>
36
+ <a href="#product-01">商品のご紹介</a>
37
+ </li>
38
+ <li>
39
+ <a href="#map">店舗のご案内</a>
40
+ </li>
41
+ </ul>
42
+ </nav>
43
+ </div>
44
+ <div class="store">
45
+ <a href="">オンラインストア</a>
46
+ </div>
15
47
  </header>
16
48
  <main>
17
49
  <section id="news" class="wrapper item">
50
+ <h2 class="cmn-title">
51
+ <span>お知らせ</span>
18
- ...
52
+ </h2>
53
+ <dl class="news-list">
54
+ <dt>2021.01.01</dt>
55
+ <dd>タイトルタイトルタイトルタイトル</dd>
56
+ <dt>2021.01.01</dt>
57
+ <dd>タイトルタイトルタイトルタイトル</dd>
58
+ <dt>2021.01.01</dt>
59
+ <dd>タイトルタイトルタイトルタイトル</dd>
60
+ <dt>2021.01.01</dt>
61
+ <dd>タイトルタイトルタイトルタイトル</dd>
62
+ <dt>2021.01.01</dt>
63
+ <dd>タイトルタイトルタイトルタイトル</dd>
64
+ </dl>
65
+ </section>
66
+ <section id="product-01" class="wrapper inview_re fadeIn_right">
67
+ <h2 class="cmn-title">
68
+ <span>タイトル</span>
69
+ </h2>
70
+ <div class="pro-img">
71
+ <img src="./img/w_m.jpg" alt="">
72
+ <p>テキストテキストテキストテキスト</p>
73
+ </div>
19
74
  </section>
20
75
  <section id="product-02" class="wrapper inview_re fadeIn_left">
21
- <h2 class="title">
76
+ <h2 class="cmn-title">
22
77
  <span>タイトル</span>
23
78
  </h2>
24
79
  <div class="pro-img">
25
- <img src="./img/03.jpg" alt="">
80
+ <img src="./img/w03.jpg" alt="">
26
81
  <p>テキストテキストテキストテキスト</p>
27
82
  </div>
28
83
  </section>
84
+ <div id="map" class="map">
85
+ <iframe src="https://www.google.com"></iframe>
86
+ </div>
87
+ </main>
88
+ <footer class="item">
89
+ <div class="flex">
90
+ <div class="right">
91
+ <div class="logo">
92
+ <img src="./img/W.png" alt="ロゴ">
93
+ </div>
94
+ <p class="info">
95
+ ...
96
+ </p>
97
+ <nav class="nav-list">
98
+ <ul>
99
+ <li><a href="#news">お知らせ</a></li>
100
+ <li><a href="#product-01">商品のご紹介</a></li>
101
+ <li><a href="#map">店舗のご案内</a></li>
102
+ </ul>
103
+ </nav>
104
+ </div>
105
+ <div class="left">
106
+ <p>
107
+ <a href="" target="_blank">オンラインストアを見る</a>|
108
+ <a href="">お問い合わせ</a>
109
+ </p>
110
+ </div>
111
+ </div>
112
+ <div class="copylight">
113
+ <p>&copy;</p>
114
+ </div>
29
115
 
116
+ </footer>
117
+ </div>
118
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
119
+ <script src="./js/animsition.min.js"></script>
120
+ <script src="./js/jquery.inview.min.js"></script>
121
+ <script src="./js/main.js"></script>
122
+
123
+ </body>
124
+ </html>
125
+
30
126
  ```
31
127
  ```CSS
128
+ *{
129
+ margin: 0;
130
+ padding: 0;
131
+ box-sizing: border-box;
132
+ }
32
133
 
134
+ body{
135
+ font-family: 'Noto Serif JP', serif;
136
+ background-color: #e6e2d7;
137
+ }
138
+
139
+ body a{
140
+ text-decoration: none;
141
+ color: white;
142
+ }
143
+
144
+ body li{
145
+ list-style: none;
146
+ }
147
+
33
148
  .wrapper{
34
149
  width: 100%;
35
150
  max-width: 1024px;
36
151
  margin: 0 auto;
37
152
  padding: 0 20px;
38
153
  }
154
+
39
155
  .item{
40
156
  opacity: 0;
41
157
  }
@@ -44,28 +160,296 @@
44
160
  opacity: 1;
45
161
  }
46
162
 
163
+
164
+ /* header */
165
+
166
+ header{
167
+ width: 100%;
168
+ height: 100vh;
169
+ background-color: black;
170
+ background-image: url(../img/w.jpg);
171
+ background-position: center top;
172
+ background-size: cover;
173
+ writing-mode: vertical-rl;
174
+ padding: 60px 80px;
175
+ position: relative;
176
+ margin-bottom: 180px;
177
+ }
178
+
179
+ .logo{
180
+ margin-left: 60px;
181
+ }
182
+ .logo img{
183
+ width: 120px;
184
+ }
185
+
186
+ .nav-list li{
187
+ margin-left: 20px;
188
+ }
189
+
190
+ .store{
191
+ display: flex;
192
+ background-color: #7df48b33;
193
+ align-items: center; position: absolute;
194
+ left: 40px;
195
+ bottom: 20px;
196
+ }
197
+ .store a{
198
+ display: inline-block;
199
+ border: #ccc 1px solid;
200
+ padding: 40px 20px;
201
+ margin: 0.5rem;
202
+ }
203
+
204
+ @media(max-width:768px){
205
+ .wrapper{
206
+ max-width: 100%;
207
+ }
208
+ header{
209
+ padding: 20px 20px;
210
+ margin-bottom: 60px;
211
+ }
212
+ .logo{
213
+ margin-left: 0;
214
+ }
215
+ .logo img{
216
+ width: 100px;
217
+ }
218
+
219
+ .store{
220
+ left: 20px;
221
+ }
222
+ }
223
+
224
+
225
+
226
+ /* main */
227
+
228
+ .cmn-title{
229
+ display: flex;
230
+ flex-direction: column;
231
+ }
232
+
233
+ /* news */
234
+ #news{
235
+ writing-mode: vertical-rl;
236
+ margin-bottom: 150px;
237
+ }
238
+
239
+ .news-list{
240
+ margin: 120px 80px 0 0;
241
+ }
242
+
243
+ .news-list dt{
244
+ border-right: 1px black solid;
245
+ padding-right: 30px;
246
+ }
247
+ .news-list dd{
248
+ padding-left: 30px;
249
+ }
250
+ .news-list dd:last-child{
251
+ border-left: 1px black solid;
252
+ }
253
+
254
+ @media(max-width:768px){
255
+ #news{
256
+ margin-bottom: 60px;
257
+ }
258
+ .news-list{
259
+ margin: 40px 20px 0 0;
260
+ }
261
+ .news-list dt{
262
+ padding-right: 10px;
263
+ }
264
+ .news-list dt:nth-of-type(n+4){
265
+ display: none;
266
+ }
267
+ .news-list dd{
268
+ padding-left: 10px;
269
+ }
270
+ .news-list dd:nth-of-type(n+4){
271
+ display: none;
272
+ }
273
+ .news-list dd:nth-of-type(3){
274
+ border-left: 1px black solid;
275
+ }
276
+ }
277
+
278
+
279
+
280
+ /* product */
281
+
47
282
  .fadeIn_right {
48
283
  opacity: 0;
49
- visibility: hidden;
284
+ visibility: hidden;
50
- transform: translate(50%, 0);
285
+ transform: translateX(100%);
51
- transition: 2s;
286
+ transition: opacity 2s, transform 2s;
52
287
  }
288
+
289
+
53
290
  .fadeIn_right.is-show {
54
- transform: translate(0, 0);
55
291
  opacity: 1;
56
- visibility: visible;
292
+ visibility: visible;
293
+ transform: translateX(0%);
57
294
  }
295
+
58
296
  .fadeIn_left {
59
297
  opacity: 0;
60
- visibility: hidden;
298
+ visibility: hidden;
61
- transform: translate(-50%, 0);
299
+ transform: translateX(-100%);
62
- transition: 2s;
300
+ transition: opacity 2s, transform 2s;
63
301
  }
302
+
64
303
  .fadeIn_left.is-show {
65
- transform: translate(0, 0);
66
304
  opacity: 1;
67
- visibility: visible;
305
+ visibility: visible;
306
+ transform: translateX(0%);
68
307
  }
308
+
309
+ #product-01,#product-02{
310
+ writing-mode: vertical-rl;
311
+ margin-bottom: 150px;
312
+ }
313
+
314
+ #product-01 .cmn-title{
315
+ flex-direction: row;
316
+ }
317
+
318
+ .pro-img {
319
+ width: 65%;
320
+ position: relative;
321
+ }
322
+ #product-01 .pro-img img{
323
+ width: 100%;
324
+ margin: 80px 20px 0 0;
325
+ }
326
+ #product-01 .pro-img p{
327
+ writing-mode: horizontal-tb;
328
+ background-color: #6df58da7;
329
+ box-shadow: #484848 8px 8px 20px;
330
+ color: #fff;
331
+ padding: 50px 120px;
332
+ position: absolute;
333
+ left: -40px;
334
+ bottom: -20px;
335
+ }
336
+
337
+ @media(max-width:768px){
338
+ #product-01,#product-02{
339
+ margin-bottom: 80px;
340
+ }
341
+
342
+ .pro-img {
343
+ width: 90%;
344
+ }
345
+ #product-01 .pro-img img{
346
+ width: 100%;
347
+ margin: 80px 10px 0 10px;
348
+ }
349
+ #product-01 .pro-img p{
350
+ font-size: 0.8em;
351
+ text-align: center;
352
+ padding: 30px 40px;
353
+ position: absolute;
354
+ left: -20px;
355
+ bottom: -10px;
356
+ }
357
+
358
+ }
359
+
360
+ #product-02{
361
+ writing-mode: vertical-lr;
362
+ }
363
+
364
+ #product-02 .cmn-title{
365
+ flex-direction: row;
366
+ }
367
+
368
+
369
+ #product-02 .pro-img img{
370
+ width: 100%;
371
+ margin: 80px 0 0 20px;
372
+ }
373
+
374
+ #product-02 .pro-img p{
375
+ writing-mode: horizontal-tb;
376
+ background-color: #ef453f99;
377
+ box-shadow: #484848 8px 8px 20px;
378
+ color: #fff;
379
+ padding: 50px 120px;
380
+ position: absolute;
381
+ right: -40px;
382
+ bottom: -20px;
383
+ }
384
+
385
+ @media(max-width:768px){
386
+
387
+ #product-02 .pro-img img{
388
+ width: 100%;
389
+ margin: 80px 0 0 10px;
390
+ }
391
+
392
+
393
+ #product-02 .pro-img p{
394
+ font-size: 0.8em;
395
+ text-align: center;
396
+ padding: 30px 40px;
397
+ position: absolute;
398
+ right: -20px;
399
+ bottom: -10px;
400
+ }
401
+ }
402
+
403
+ .map iframe{
404
+ width: 100%;
405
+ }
406
+
407
+ /* footer */
408
+ footer{
409
+ width: 100%;
410
+ background-color: black;
411
+ color: white;
412
+ padding: 80px 80px 30px 30px;
413
+ }
414
+ .flex{
415
+ writing-mode: vertical-rl;
416
+ width: 100%;
417
+ display: flex;
418
+ justify-content: space-between;
419
+ flex-direction: column;
420
+ margin-bottom: 30px;
421
+ }
422
+ .right .info{
423
+ line-height: 2;
424
+ margin-left: 60px;
425
+ font-size: 0.9rem;
426
+ }
427
+ .left{
428
+ font-size: 0.9rem;
429
+ }
430
+ .copylight{
431
+ writing-mode: horizontal-tb;
432
+ text-align: center;
433
+ font-size: 0.5em;
434
+ }
435
+
436
+ @media(max-width:768px){
437
+ footer{
438
+ padding: 30px 20px 20px;
439
+ }
440
+ footer .flex .right .logo{
441
+ margin-left: 0;
442
+ }
443
+ .right .info{
444
+ margin-left: 30px;
445
+ }
446
+ footer .nav-list li{
447
+ margin-left: 10px;
448
+ font-size: 0.9em;
449
+ }
450
+
451
+ }
452
+
69
453
  ```
70
454
 
71
455
  ```js