質問編集履歴

1

修正しました

2021/12/02 08:10

投稿

free_teku
free_teku

スコア103

test CHANGED
File without changes
test CHANGED
@@ -6,6 +6,10 @@
6
6
 
7
7
 
8
8
 
9
+ ![transform](0a088f9f3dc2f94baa0644a588529cca.jpeg)
10
+
11
+
12
+
9
13
  ### 発生している問題・エラーメッセージ
10
14
 
11
15
 
@@ -14,694 +18,694 @@
14
18
 
15
19
  メソッドcssで、上記の動きを試みたができません。
16
20
 
21
+ ```
22
+
23
+ ### 試したこと
24
+
25
+ メソッドcssで、上記の動きを試みたができません。
26
+
17
27
  調べたけど、ヒントになるサイトは出なかった。
18
28
 
29
+
30
+
31
+ ### 該当のソースコード
32
+
33
+
34
+
35
+ ```HTML
36
+
37
+ <!DOCTYPE html>
38
+
39
+ <html>
40
+
41
+ <head>
42
+
43
+ <link rel="stylesheet" type="text/css" href="../css/destyle.css">
44
+
45
+ <link rel="stylesheet" type="text/css" href="../Onsen/css/onsen.css">
46
+
47
+ </head>
48
+
49
+ <body>
50
+
51
+ <main class="main">
52
+
53
+
54
+
55
+ <div class="inner">
56
+
57
+ <section class="bread">
58
+
59
+ <div class="bread-inner">
60
+
61
+ <div>
62
+
63
+ <ol class="breadcrumbs" itemscope itemtype="https://schema.org/BreadcrumbList">
64
+
65
+ <li itemprop=”itemListElement” itemscope itemtype=”https://schema.org/ListItem” class="bread-item">
66
+
67
+ <a itemprop="item" href="index.html">
68
+
69
+ <span itemprop="name">トップ</span>
70
+
71
+ </a>
72
+
73
+ <meta itemprop="position" content="1" />
74
+
75
+ </li><!-- /.bread-item -->
76
+
77
+ <li itemprop=”itemListElement” itemscope itemtype=”https://schema.org/ListItem” class="bread-item">
78
+
79
+ <a itemprop="item" href="onsen.html">
80
+
81
+ <span itemprop="name">温泉</span>
82
+
83
+ </a>
84
+
85
+ <meta itemprop="position" content="2" />
86
+
87
+ </li><!-- /.bread-item -->
88
+
89
+ </ol><!-- /.breadcrumbs -->
90
+
91
+ </div>
92
+
93
+ </div><!-- /.bread-inner -->
94
+
95
+ </section><!-- /.bread -->
96
+
97
+
98
+
99
+ <div class="message">
100
+
101
+ <p>心。<br>
102
+
103
+ ただけます。<br>
104
+
105
+ 心身共にリラックスできます。</p>
106
+
107
+ </div><!-- /.message -->
108
+
109
+ <section class="onsen">
110
+
111
+ <div class="contents-inner">
112
+
113
+
114
+
115
+ <ul class="onsen-list">
116
+
117
+ <!-- 1 -->
118
+
119
+ <li class="onsen-item">
120
+
121
+ <div class="onsen-item-img onsen-contents-left aos-init aos-animate" data-aos="fade-up" data-aos-delay="100">
122
+
123
+ <img src="../Onsen/img/onsen01.jpg" alt="温泉1">
124
+
125
+ </div>
126
+
127
+ <div class="onsen-item-txt onsen-item-txt-right aos-init aos-animate" data-aos="fade-up" data-aos-delay="500">
128
+
129
+ <div class="jp-text">
130
+
131
+ <p class="ttl">湯」</p><!-- /.ttl -->
132
+
133
+ <p class="desc1">よさ <br>
134
+
135
+ 望みながら・・・</p>
136
+
137
+ </div><!-- /.jp-text -->
138
+
139
+ </div><!-- /.onsen-contents-right -->
140
+
141
+ </li><!-- /.onsen-item -->
142
+
143
+ <!-- 2 -->
144
+
145
+ <li class="onsen-item">
146
+
147
+ <div class="onsen-item-img onsen-contents-right aos-init aos-animate" data-aos="fade-up" data-aos-delay="100">
148
+
149
+ <img src="../Onsen/img/onsen02.jpg" alt="温泉2">
150
+
151
+ </div>
152
+
153
+ <div class="onsen-item-txt onsen-item-txt-left aos-init aos-animate" data-aos="fade-up" data-aos-delay="500">
154
+
155
+ <div class="jp-text">
156
+
157
+ <p class="ttl">黄泉を</p><!-- /.ttl -->
158
+
159
+ <p class="desc1">ま硫酸塩泉を、<br>
160
+
161
+ たっぷりと掛け流しています。<br>
162
+
163
+ 四季の移り変わりを、天然温泉の湯に浸りながら味わってください。</p>
164
+
165
+ </div><!-- /.jp-text -->
166
+
167
+ </div><!-- /.onsen-contents-right -->
168
+
169
+ </li><!-- /.onsen-item -->
170
+
171
+ </ul><!-- /.onsen-list -->
172
+
173
+ </div><!-- /.contents-inner -->
174
+
175
+ </section><!-- /.onsen-contents -->
176
+
177
+
178
+
179
+ </div><!-- /.inner -->
180
+
181
+
182
+
183
+ </main><!-- /.main -->
184
+
185
+ </body>
186
+
187
+ </html>
188
+
19
189
  ```
20
190
 
21
- ### 試したこと
22
-
23
-
24
-
25
-
26
-
27
- ### 該当のソースコード
28
-
29
-
30
-
31
- ```HTML
32
-
33
- <!DOCTYPE html>
34
-
35
- <html>
36
-
37
- <head>
38
-
39
- <link rel="stylesheet" type="text/css" href="../css/destyle.css">
40
-
41
- <link rel="stylesheet" type="text/css" href="../Onsen/css/onsen.css">
42
-
43
- </head>
44
-
45
- <body>
46
-
47
- <main class="main">
48
-
49
-
50
-
51
- <div class="inner">
52
-
53
- <section class="bread">
54
-
55
- <div class="bread-inner">
56
-
57
- <div>
58
-
59
- <ol class="breadcrumbs" itemscope itemtype="https://schema.org/BreadcrumbList">
60
-
61
- <li itemprop=”itemListElement” itemscope itemtype=”https://schema.org/ListItem” class="bread-item">
62
-
63
- <a itemprop="item" href="index.html">
64
-
65
- <span itemprop="name">トップ</span>
66
-
67
- </a>
68
-
69
- <meta itemprop="position" content="1" />
70
-
71
- </li><!-- /.bread-item -->
72
-
73
- <li itemprop=”itemListElement” itemscope itemtype=”https://schema.org/ListItem” class="bread-item">
74
-
75
- <a itemprop="item" href="onsen.html">
76
-
77
- <span itemprop="name">温泉</span>
78
-
79
- </a>
80
-
81
- <meta itemprop="position" content="2" />
82
-
83
- </li><!-- /.bread-item -->
84
-
85
- </ol><!-- /.breadcrumbs -->
86
-
87
- </div>
88
-
89
- </div><!-- /.bread-inner -->
90
-
91
- </section><!-- /.bread -->
92
-
93
-
94
-
95
- <div class="message">
96
-
97
- <p>心。<br>
98
-
99
- ただけます。<br>
100
-
101
- 心身共にリラックスできます。</p>
102
-
103
- </div><!-- /.message -->
104
-
105
- <section class="onsen">
106
-
107
- <div class="contents-inner">
108
-
109
-
110
-
111
- <ul class="onsen-list">
112
-
113
- <!-- 1 -->
114
-
115
- <li class="onsen-item">
116
-
117
- <div class="onsen-item-img onsen-contents-left aos-init aos-animate" data-aos="fade-up" data-aos-delay="100">
118
-
119
- <img src="../Onsen/img/onsen01.jpg" alt="温泉1">
120
-
121
- </div>
122
-
123
- <div class="onsen-item-txt onsen-item-txt-right aos-init aos-animate" data-aos="fade-up" data-aos-delay="500">
124
-
125
- <div class="jp-text">
126
-
127
- <p class="ttl">湯」</p><!-- /.ttl -->
128
-
129
- <p class="desc1">よさ <br>
130
-
131
- 望みながら・・・</p>
132
-
133
- </div><!-- /.jp-text -->
134
-
135
- </div><!-- /.onsen-contents-right -->
136
-
137
- </li><!-- /.onsen-item -->
138
-
139
- <!-- 2 -->
140
-
141
- <li class="onsen-item">
142
-
143
- <div class="onsen-item-img onsen-contents-right aos-init aos-animate" data-aos="fade-up" data-aos-delay="100">
144
-
145
- <img src="../Onsen/img/onsen02.jpg" alt="温泉2">
146
-
147
- </div>
148
-
149
- <div class="onsen-item-txt onsen-item-txt-left aos-init aos-animate" data-aos="fade-up" data-aos-delay="500">
150
-
151
- <div class="jp-text">
152
-
153
- <p class="ttl">黄泉を</p><!-- /.ttl -->
154
-
155
- <p class="desc1">ま硫酸塩泉を、<br>
156
-
157
- たっぷりと掛け流しています。<br>
158
-
159
- 四季の移り変わりを、天然温泉の湯に浸りながら味わってください。</p>
160
-
161
- </div><!-- /.jp-text -->
162
-
163
- </div><!-- /.onsen-contents-right -->
164
-
165
- </li><!-- /.onsen-item -->
166
-
167
- </ul><!-- /.onsen-list -->
168
-
169
- </div><!-- /.contents-inner -->
170
-
171
- </section><!-- /.onsen-contents -->
172
-
173
-
174
-
175
- </div><!-- /.inner -->
176
-
177
-
178
-
179
- </main><!-- /.main -->
180
-
181
- </body>
182
-
183
- </html>
191
+ ```CSS
192
+
193
+ @charset "UTF-8";
194
+
195
+ .body-wrapper {
196
+
197
+ overflow: hidden;
198
+
199
+ }
200
+
201
+
202
+
203
+ html {
204
+
205
+ font-size: 62.5%;
206
+
207
+ }
208
+
209
+
210
+
211
+ body {
212
+
213
+ font-size: 1.6rem;
214
+
215
+ color: #000000;
216
+
217
+ }
218
+
219
+
220
+
221
+ img {
222
+
223
+ width: 100%;
224
+
225
+ height: auto;
226
+
227
+ vertical-align: bottom;
228
+
229
+ }
230
+
231
+
232
+
233
+ a {
234
+
235
+ text-decoration: none;
236
+
237
+ }
238
+
239
+
240
+
241
+ li {
242
+
243
+ list-style: none;
244
+
245
+ }
246
+
247
+
248
+
249
+ .inner {
250
+
251
+ max-width: 1180px;
252
+
253
+ margin: 0 auto;
254
+
255
+ }
256
+
257
+
258
+
259
+ .wrapper {
260
+
261
+ width: 100%;
262
+
263
+ margin: 0 auto;
264
+
265
+ }
266
+
267
+
268
+
269
+
270
+
271
+ .contents-inner {
272
+
273
+ width: 1180px;
274
+
275
+ margin: 0 auto;
276
+
277
+ }
184
278
 
185
279
  ```
186
280
 
187
- ```CSS
188
-
189
- @charset "UTF-8";
190
-
191
- .body-wrapper {
192
-
193
- overflow: hidden;
194
-
195
- }
196
-
197
-
198
-
199
- html {
200
-
201
- font-size: 62.5%;
202
-
203
- }
204
-
205
-
206
-
207
- body {
208
-
209
- font-size: 1.6rem;
210
-
211
- color: #000000;
212
-
213
- }
214
-
215
-
216
-
217
- img {
218
-
219
- width: 100%;
220
-
221
- height: auto;
222
-
223
- vertical-align: bottom;
224
-
225
- }
226
-
227
-
228
-
229
- a {
230
-
231
- text-decoration: none;
232
-
233
- }
234
-
235
-
236
-
237
- li {
238
-
239
- list-style: none;
240
-
241
- }
242
-
243
-
244
-
245
- .inner {
246
-
247
- max-width: 1180px;
248
-
249
- margin: 0 auto;
250
-
251
- }
252
-
253
-
254
-
255
- .wrapper {
256
-
257
- width: 100%;
258
-
259
- margin: 0 auto;
260
-
261
- }
262
-
263
-
264
-
265
-
266
-
267
- .contents-inner {
268
-
269
- width: 1180px;
270
-
271
- margin: 0 auto;
281
+ ```main.css
282
+
283
+
284
+
285
+ .onsen-list {
286
+
287
+ -webkit-box-pack: justify;
288
+
289
+ -webkit-justify-content: space-between;
290
+
291
+ -ms-flex-pack: justify;
292
+
293
+ justify-content: space-between;
294
+
295
+ margin-top: 80px;
296
+
297
+ }
298
+
299
+
300
+
301
+ @media screen and (max-width: 599px) {
302
+
303
+ .onsen-list {
304
+
305
+ display: -webkit-box;
306
+
307
+ display: -webkit-flex;
308
+
309
+ display: -ms-flexbox;
310
+
311
+ display: flex;
312
+
313
+ -webkit-box-orient: vertical;
314
+
315
+ -webkit-box-direction: normal;
316
+
317
+ -webkit-flex-direction: column;
318
+
319
+ -ms-flex-direction: column;
320
+
321
+ flex-direction: column;
322
+
323
+ -webkit-box-align: center;
324
+
325
+ -webkit-align-items: center;
326
+
327
+ -ms-flex-align: center;
328
+
329
+ align-items: center;
330
+
331
+ }
332
+
333
+ }
334
+
335
+
336
+
337
+ .onsen-item {
338
+
339
+ position: relative;
340
+
341
+ margin-bottom: 290px;
342
+
343
+ }
344
+
345
+
346
+
347
+ @media screen and (min-width: 600px) and (max-width: 1179px) {
348
+
349
+ .onsen-item {
350
+
351
+ display: -webkit-box;
352
+
353
+ display: -webkit-flex;
354
+
355
+ display: -ms-flexbox;
356
+
357
+ display: flex;
358
+
359
+ -webkit-box-orient: vertical;
360
+
361
+ -webkit-box-direction: normal;
362
+
363
+ -webkit-flex-direction: column;
364
+
365
+ -ms-flex-direction: column;
366
+
367
+ flex-direction: column;
368
+
369
+ -webkit-box-pack: center;
370
+
371
+ -webkit-justify-content: center;
372
+
373
+ -ms-flex-pack: center;
374
+
375
+ justify-content: center;
376
+
377
+ -webkit-box-align: center;
378
+
379
+ -webkit-align-items: center;
380
+
381
+ -ms-flex-align: center;
382
+
383
+ align-items: center;
384
+
385
+ margin-bottom: 550px;
386
+
387
+ }
388
+
389
+ }
390
+
391
+
392
+
393
+ .onsen-item:nth-of-type(2) {
394
+
395
+ position: relative;
396
+
397
+ margin-bottom: 290px;
398
+
399
+ display: -webkit-box;
400
+
401
+ display: -webkit-flex;
402
+
403
+ display: -ms-flexbox;
404
+
405
+ display: flex;
406
+
407
+ -webkit-box-orient: horizontal;
408
+
409
+ -webkit-box-direction: reverse;
410
+
411
+ -webkit-flex-direction: row-reverse;
412
+
413
+ -ms-flex-direction: row-reverse;
414
+
415
+ flex-direction: row-reverse;
416
+
417
+ }
418
+
419
+
420
+
421
+ @media screen and (min-width: 600px) and (max-width: 1179px) {
422
+
423
+ .onsen-item:nth-of-type(2) {
424
+
425
+ display: -webkit-box;
426
+
427
+ display: -webkit-flex;
428
+
429
+ display: -ms-flexbox;
430
+
431
+ display: flex;
432
+
433
+ -webkit-box-orient: vertical;
434
+
435
+ -webkit-box-direction: normal;
436
+
437
+ -webkit-flex-direction: column;
438
+
439
+ -ms-flex-direction: column;
440
+
441
+ flex-direction: column;
442
+
443
+ -webkit-box-pack: center;
444
+
445
+ -webkit-justify-content: center;
446
+
447
+ -ms-flex-pack: center;
448
+
449
+ justify-content: center;
450
+
451
+ -webkit-box-align: center;
452
+
453
+ -webkit-align-items: center;
454
+
455
+ -ms-flex-align: center;
456
+
457
+ align-items: center;
458
+
459
+ margin-bottom: 550px;
460
+
461
+ }
462
+
463
+ }
464
+
465
+
466
+
467
+ .onsen-item-img {
468
+
469
+ width: 525px;
470
+
471
+ height: 300px;
472
+
473
+ }
474
+
475
+
476
+
477
+ @media screen and (min-width: 600px) and (max-width: 1179px) {
478
+
479
+ .onsen-item-img {
480
+
481
+ margin-left: -350px;
482
+
483
+ }
484
+
485
+ }
486
+
487
+
488
+
489
+ .onsen-item-txt {
490
+
491
+ background-image: url(../../img/bg.png);
492
+
493
+ background-position: center;
494
+
495
+ background-size: cover;
496
+
497
+ }
498
+
499
+
500
+
501
+ @media screen and (min-width: 600px) and (max-width: 1179px) {
502
+
503
+ .onsen-item-txt {
504
+
505
+ width: 100%;
506
+
507
+ }
508
+
509
+ }
510
+
511
+
512
+
513
+ .onsen-item-txt-right {
514
+
515
+ position: absolute;
516
+
517
+ top: 50%;
518
+
519
+ right: 0;
520
+
521
+ -webkit-transform: translateY(-50%);
522
+
523
+ transform: translateY(-50%);
524
+
525
+ width: 810px;
526
+
527
+ height: 380px;
528
+
529
+ line-height: 1.5;
530
+
531
+ padding: 20px;
532
+
533
+ z-index: -2;
534
+
535
+ }
536
+
537
+
538
+
539
+ @media screen and (min-width: 600px) and (max-width: 1179px) {
540
+
541
+ .onsen-item-txt-right {
542
+
543
+ /* position: absolute;
544
+
545
+ top: 50%;
546
+
547
+ left: 50%;
548
+
549
+ transform: translate(-50%, -50%); */
550
+
551
+ left: 0%;
552
+
553
+ margin-top: 300px;
554
+
555
+ margin-right: 450px;
556
+
557
+ -webkit-transform: translate(-50%, 50%);
558
+
559
+ transform: translate(-50%, 50%);
560
+
561
+ }
562
+
563
+ }
564
+
565
+
566
+
567
+ .onsen-item-txt-right .jp-text {
568
+
569
+ text-align: center;
570
+
571
+ position: relative;
572
+
573
+ top: 40%;
574
+
575
+ left: 50%;
576
+
577
+ -webkit-transform: translate(-40%, -50%);
578
+
579
+ transform: translate(-40%, -50%);
580
+
581
+ }
582
+
583
+
584
+
585
+ .onsen-item-txt-right .jp-text .ttl {
586
+
587
+ padding: 30px 0px 50px;
588
+
589
+ font-size: 2.4rem;
590
+
591
+ }
592
+
593
+
594
+
595
+ .onsen-item-txt-right .jp-text .desc1 {
596
+
597
+ line-height: 2.0;
598
+
599
+ }
600
+
601
+
602
+
603
+ .onsen-item-txt-left {
604
+
605
+ position: absolute;
606
+
607
+ top: 50%;
608
+
609
+ left: 0;
610
+
611
+ -webkit-transform: translateY(-50%);
612
+
613
+ transform: translateY(-50%);
614
+
615
+ width: 810px;
616
+
617
+ height: 380px;
618
+
619
+ line-height: 1.5;
620
+
621
+ padding: 20px;
622
+
623
+ z-index: -2;
624
+
625
+ }
626
+
627
+
628
+
629
+ .onsen-item-txt-left .jp-text {
630
+
631
+ text-align: center;
632
+
633
+ position: relative;
634
+
635
+ top: 40%;
636
+
637
+ left: 40%;
638
+
639
+ -webkit-transform: translate(-40%, -50%);
640
+
641
+ transform: translate(-40%, -50%);
642
+
643
+ }
644
+
645
+
646
+
647
+ .onsen-item-txt-left .jp-text .ttl {
648
+
649
+ padding: 30px 0px 50px;
650
+
651
+ font-size: 2.4rem;
652
+
653
+ }
654
+
655
+
656
+
657
+ .onsen-item-txt-left .jp-text .desc1 {
658
+
659
+ line-height: 2.0;
660
+
661
+ }
662
+
663
+
664
+
665
+ @media screen and (min-width: 600px) and (max-width: 1179px) {
666
+
667
+ .onsen-item-txt-left {
668
+
669
+ /* position: absolute;
670
+
671
+ top: 50%;
672
+
673
+ left: 50%;
674
+
675
+ transform: translate(-50%, -50%); */
676
+
677
+ margin-top: 200px;
678
+
679
+ margin-right: 450px;
680
+
681
+ }
272
682
 
273
683
  }
274
684
 
275
685
  ```
276
686
 
277
- ```main.css
278
-
279
-
280
-
281
- .onsen-list {
282
-
283
- -webkit-box-pack: justify;
284
-
285
- -webkit-justify-content: space-between;
286
-
287
- -ms-flex-pack: justify;
288
-
289
- justify-content: space-between;
290
-
291
- margin-top: 80px;
292
-
293
- }
294
-
295
-
296
-
297
- @media screen and (max-width: 599px) {
298
-
299
- .onsen-list {
300
-
301
- display: -webkit-box;
302
-
303
- display: -webkit-flex;
304
-
305
- display: -ms-flexbox;
306
-
307
- display: flex;
308
-
309
- -webkit-box-orient: vertical;
310
-
311
- -webkit-box-direction: normal;
312
-
313
- -webkit-flex-direction: column;
314
-
315
- -ms-flex-direction: column;
316
-
317
- flex-direction: column;
318
-
319
- -webkit-box-align: center;
320
-
321
- -webkit-align-items: center;
322
-
323
- -ms-flex-align: center;
324
-
325
- align-items: center;
326
-
327
- }
328
-
329
- }
330
-
331
-
332
-
333
- .onsen-item {
334
-
335
- position: relative;
336
-
337
- margin-bottom: 290px;
338
-
339
- }
340
-
341
-
342
-
343
- @media screen and (min-width: 600px) and (max-width: 1179px) {
344
-
345
- .onsen-item {
346
-
347
- display: -webkit-box;
348
-
349
- display: -webkit-flex;
350
-
351
- display: -ms-flexbox;
352
-
353
- display: flex;
354
-
355
- -webkit-box-orient: vertical;
356
-
357
- -webkit-box-direction: normal;
358
-
359
- -webkit-flex-direction: column;
360
-
361
- -ms-flex-direction: column;
362
-
363
- flex-direction: column;
364
-
365
- -webkit-box-pack: center;
366
-
367
- -webkit-justify-content: center;
368
-
369
- -ms-flex-pack: center;
370
-
371
- justify-content: center;
372
-
373
- -webkit-box-align: center;
374
-
375
- -webkit-align-items: center;
376
-
377
- -ms-flex-align: center;
378
-
379
- align-items: center;
380
-
381
- margin-bottom: 550px;
382
-
383
- }
384
-
385
- }
386
-
387
-
388
-
389
- .onsen-item:nth-of-type(2) {
390
-
391
- position: relative;
392
-
393
- margin-bottom: 290px;
394
-
395
- display: -webkit-box;
396
-
397
- display: -webkit-flex;
398
-
399
- display: -ms-flexbox;
400
-
401
- display: flex;
402
-
403
- -webkit-box-orient: horizontal;
404
-
405
- -webkit-box-direction: reverse;
406
-
407
- -webkit-flex-direction: row-reverse;
408
-
409
- -ms-flex-direction: row-reverse;
410
-
411
- flex-direction: row-reverse;
412
-
413
- }
414
-
415
-
416
-
417
- @media screen and (min-width: 600px) and (max-width: 1179px) {
418
-
419
- .onsen-item:nth-of-type(2) {
420
-
421
- display: -webkit-box;
422
-
423
- display: -webkit-flex;
424
-
425
- display: -ms-flexbox;
426
-
427
- display: flex;
428
-
429
- -webkit-box-orient: vertical;
430
-
431
- -webkit-box-direction: normal;
432
-
433
- -webkit-flex-direction: column;
434
-
435
- -ms-flex-direction: column;
436
-
437
- flex-direction: column;
438
-
439
- -webkit-box-pack: center;
440
-
441
- -webkit-justify-content: center;
442
-
443
- -ms-flex-pack: center;
444
-
445
- justify-content: center;
446
-
447
- -webkit-box-align: center;
448
-
449
- -webkit-align-items: center;
450
-
451
- -ms-flex-align: center;
452
-
453
- align-items: center;
454
-
455
- margin-bottom: 550px;
456
-
457
- }
458
-
459
- }
460
-
461
-
462
-
463
- .onsen-item-img {
464
-
465
- width: 525px;
466
-
467
- height: 300px;
468
-
469
- }
470
-
471
-
472
-
473
- @media screen and (min-width: 600px) and (max-width: 1179px) {
474
-
475
- .onsen-item-img {
476
-
477
- margin-left: -350px;
478
-
479
- }
480
-
481
- }
482
-
483
-
484
-
485
- .onsen-item-txt {
486
-
487
- background-image: url(../../img/bg.png);
488
-
489
- background-position: center;
490
-
491
- background-size: cover;
492
-
493
- }
494
-
495
-
496
-
497
- @media screen and (min-width: 600px) and (max-width: 1179px) {
498
-
499
- .onsen-item-txt {
500
-
501
- width: 100%;
502
-
503
- }
504
-
505
- }
506
-
507
-
508
-
509
- .onsen-item-txt-right {
510
-
511
- position: absolute;
512
-
513
- top: 50%;
514
-
515
- right: 0;
516
-
517
- -webkit-transform: translateY(-50%);
518
-
519
- transform: translateY(-50%);
520
-
521
- width: 810px;
522
-
523
- height: 380px;
524
-
525
- line-height: 1.5;
526
-
527
- padding: 20px;
528
-
529
- z-index: -2;
530
-
531
- }
532
-
533
-
534
-
535
- @media screen and (min-width: 600px) and (max-width: 1179px) {
536
-
537
- .onsen-item-txt-right {
538
-
539
- /* position: absolute;
540
-
541
- top: 50%;
542
-
543
- left: 50%;
544
-
545
- transform: translate(-50%, -50%); */
546
-
547
- left: 0%;
548
-
549
- margin-top: 300px;
550
-
551
- margin-right: 450px;
552
-
553
- -webkit-transform: translate(-50%, 50%);
554
-
555
- transform: translate(-50%, 50%);
556
-
557
- }
558
-
559
- }
560
-
561
-
562
-
563
- .onsen-item-txt-right .jp-text {
564
-
565
- text-align: center;
566
-
567
- position: relative;
568
-
569
- top: 40%;
570
-
571
- left: 50%;
572
-
573
- -webkit-transform: translate(-40%, -50%);
574
-
575
- transform: translate(-40%, -50%);
576
-
577
- }
578
-
579
-
580
-
581
- .onsen-item-txt-right .jp-text .ttl {
582
-
583
- padding: 30px 0px 50px;
584
-
585
- font-size: 2.4rem;
586
-
587
- }
588
-
589
-
590
-
591
- .onsen-item-txt-right .jp-text .desc1 {
592
-
593
- line-height: 2.0;
594
-
595
- }
596
-
597
-
598
-
599
- .onsen-item-txt-left {
600
-
601
- position: absolute;
602
-
603
- top: 50%;
604
-
605
- left: 0;
606
-
607
- -webkit-transform: translateY(-50%);
608
-
609
- transform: translateY(-50%);
610
-
611
- width: 810px;
612
-
613
- height: 380px;
614
-
615
- line-height: 1.5;
616
-
617
- padding: 20px;
618
-
619
- z-index: -2;
620
-
621
- }
622
-
623
-
624
-
625
- .onsen-item-txt-left .jp-text {
626
-
627
- text-align: center;
628
-
629
- position: relative;
630
-
631
- top: 40%;
632
-
633
- left: 40%;
634
-
635
- -webkit-transform: translate(-40%, -50%);
636
-
637
- transform: translate(-40%, -50%);
638
-
639
- }
640
-
641
-
642
-
643
- .onsen-item-txt-left .jp-text .ttl {
644
-
645
- padding: 30px 0px 50px;
646
-
647
- font-size: 2.4rem;
648
-
649
- }
650
-
651
-
652
-
653
- .onsen-item-txt-left .jp-text .desc1 {
654
-
655
- line-height: 2.0;
656
-
657
- }
658
-
659
-
660
-
661
- @media screen and (min-width: 600px) and (max-width: 1179px) {
662
-
663
- .onsen-item-txt-left {
664
-
665
- /* position: absolute;
666
-
667
- top: 50%;
668
-
669
- left: 50%;
670
-
671
- transform: translate(-50%, -50%); */
672
-
673
- margin-top: 200px;
674
-
675
- margin-right: 450px;
676
-
677
- }
678
-
679
- }
687
+
688
+
689
+
690
+
691
+ ```js
692
+
693
+ $(function(){
694
+
695
+ var winW = $(window).width();
696
+
697
+ var devW = 700;
698
+
699
+ if(winW<=derW) {
700
+
701
+ $(".onsen-item-txt").css('transform', 'translateY()');
702
+
703
+ }
704
+
705
+ });
680
706
 
681
707
  ```
682
708
 
683
709
 
684
710
 
685
-
686
-
687
- ```js
688
-
689
- $(function(){
690
-
691
- var winW = $(window).width();
692
-
693
- var devW = 700;
694
-
695
- if(winW<=derW) {
696
-
697
- $(".onsen-item-txt").css('transform', 'translateY()');
698
-
699
- }
700
-
701
- });
702
-
703
- ```
704
-
705
-
706
-
707
711
  ### 補足情報(FW/ツールのバージョンなど)