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

質問編集履歴

1

文字制限の為自分で追記したCSSのみ入れます

2020/07/13 08:33

投稿

hati3693
hati3693

スコア24

title CHANGED
File without changes
body CHANGED
@@ -30,156 +30,362 @@
30
30
  ```
31
31
 
32
32
  ```css
33
- div.content {
33
+ .detail_img_inner {
34
- /* The display of content is enabled using jQuery so that the slideshow content won't display unless javascript is enabled. */
34
+ display: -webkit-box;
35
+ display: -ms-flexbox;
35
- display: none;
36
+ display: flex;
37
+ -webkit-box-orient: horizontal;
38
+ -webkit-box-direction: reverse;
39
+ -ms-flex-flow: row-reverse;
40
+ flex-flow: row-reverse;
41
+ -webkit-box-pack: center;
36
- float: right;
42
+ -ms-flex-pack: center;
37
- width: 550px;
43
+ justify-content: center;
38
44
  }
45
+
39
- div.content a, div.navigation a {
46
+ #gallery.content {
40
- text-decoration: none;
47
+ display: none;
48
+ float: right;
49
+ width: 550px;
50
+ width: 60%;
51
+ height: auto;
52
+ display: block;
41
- color: #777;
53
+ float: none;
54
+ position: relative;
42
55
  }
56
+
43
- div.content a:focus, div.content a:hover, div.content a:active {
57
+ div.slideshow-container {
44
- text-decoration: underline;
58
+ position: relative;
59
+ clear: both;
60
+ height: auto;
45
61
  }
62
+
46
- div.controls {
63
+ div.slideshow img {
47
- margin-top: 5px;
64
+ vertical-align: middle;
65
+ border: none;
48
- height: 23px;
66
+ width: auto;
49
67
  }
68
+
50
- div.controls a {
69
+ #loading.loader {
70
+ position: absolute;
71
+ top: 0;
72
+ left: 0;
73
+ background-image: url(loader.gif);
74
+ background-repeat: no-repeat;
75
+ background-position: center;
51
- padding: 5px;
76
+ width: 100%;
77
+ height: auto;
52
78
  }
79
+
53
- div.ss-controls {
80
+ ul.thumbs img {
81
+ border: none;
54
- float: left;
82
+ display: block;
83
+ margin: 0 auto 2px auto;
55
84
  }
85
+
56
86
  div.nav-controls {
57
- float: right;
87
+ float: none;
58
88
  }
59
- div.slideshow-container {
60
- position: relative;
61
- clear: both;
62
- height: 502px; /* This should be set to be at least the height of the largest image in the slideshow */
63
- }
64
- div.loader {
65
- position: absolute;
66
- top: 0;
67
- left: 0;
68
- background-image: url('loader.gif');
69
- background-repeat: no-repeat;
70
- background-position: center;
71
- width: 550px;
72
- height: 502px; /* This should be set to be at least the height of the largest image in the slideshow */
73
- }
74
- div.slideshow {
75
89
 
76
- }
77
- div.slideshow span.image-wrapper {
78
- display: block;
79
- position: absolute;
80
- top: 0;
81
- left: 0;
82
- }
83
90
  div.slideshow a.advance-link {
84
- display: block;
91
+ display: block;
85
- width: 550px;
92
+ width: 550px;
86
- height: 502px; /* This should be set to be at least the height of the largest image in the slideshow */
93
+ height: auto;
87
- line-height: 502px; /* This should be set to be at least the height of the largest image in the slideshow */
88
- text-align: center;
94
+ text-align: center;
95
+ line-height: normal;
96
+ width: auto;
89
97
  }
98
+
90
- div.slideshow a.advance-link:hover, div.slideshow a.advance-link:active, div.slideshow a.advance-link:visited {
99
+ #thumbs.navigation {
100
+ float: none;
101
+ width: 38%;
102
+ margin-right: .5%;
103
+ background: #f7f3ef;
104
+ position: relative;
91
- text-decoration: none;
105
+ text-align: center;
106
+ padding: 1%;
107
+ overflow: hidden;
92
108
  }
109
+
93
- div.slideshow img {
110
+ ul.thumbs li.selected a.thumb {
94
- vertical-align: middle;
111
+ background: #ffffff;
112
+ -webkit-box-shadow: 0 0 0 3px #f3cd64 inset;
113
+ box-shadow: 0 0 0 3px #f3cd64 inset;
95
- border: 1px solid #ccc;
114
+ border: 1px solid #f3cd64;
96
115
  }
116
+
97
- div.download {
117
+ ul.thumbs {
98
- float: right;
118
+ clear: both;
119
+ width: 100%;
120
+ display: -webkit-box;
121
+ display: -ms-flexbox;
122
+ display: flex;
123
+ -webkit-box-orient: horizontal;
124
+ -webkit-box-direction: normal;
125
+ -ms-flex-flow: row wrap;
126
+ flex-flow: row wrap;
127
+ -webkit-box-pack: start;
128
+ -ms-flex-pack: start;
129
+ justify-content: flex-start;
130
+ position: relative;
131
+ height: 100%;
132
+ overflow-y: scroll;
99
133
  }
134
+
100
- div.caption-container {
135
+ .scrollbar-primary::-webkit-scrollbar {
101
- position: relative;
102
- clear: left;
103
- height: 75px;
136
+ width: 12px;
137
+ background-color: #fff;
138
+ border-radius: 5px;
104
139
  }
140
+
105
- span.image-caption {
141
+ .scrollbar-primary::-webkit-scrollbar-thumb {
106
- display: block;
107
- position: absolute;
108
- width: 550px;
142
+ border-radius: 10px;
109
- top: 0;
143
+ background-color: #f3cd64;
110
- left: 0;
111
144
  }
145
+
112
- div.caption {
146
+ ul.thumbs li {
147
+ float: left;
113
- padding: 12px;
148
+ padding: 0;
149
+ margin: 4px 3px 4px 3px;
150
+ list-style: none;
151
+ width: calc(34% - 6px - 1%);
114
152
  }
153
+
115
- div.image-title {
154
+ div.navigation div.top, div.navigation div.bottom {
116
- font-weight: bold;
155
+ height: 25px;
156
+ display: -webkit-box;
157
+ display: -ms-flexbox;
117
- font-size: 1.4em;
158
+ display: flex;
159
+ margin: 25px 0 12px 0;
118
160
  }
161
+
162
+ div.pagination a, div.pagination span.current, div.pagination span.ellipsis {
119
- div.image-desc {
163
+ display: block;
120
- line-height: 1.3em;
121
- padding-top: 12px;
164
+ margin-right: 2px;
165
+ padding: 4px 7px 2px 7px;
166
+ border: 1px solid #ccc;
167
+ height: 31px;
168
+ display: -webkit-box;
169
+ display: -ms-flexbox;
170
+ display: flex;
171
+ -webkit-box-align: center;
172
+ -ms-flex-align: center;
173
+ align-items: center;
174
+ float: none;
122
175
  }
176
+
123
- div.navigation {
177
+ .pagination_wrap {
178
+ display: -webkit-box;
179
+ display: -ms-flexbox;
180
+ display: flex;
181
+ -webkit-box-pack: center;
182
+ -ms-flex-pack: center;
124
- /* The navigation style is set using jQuery so that the javascript specific styles won't be applied unless javascript is enabled. */
183
+ justify-content: center;
184
+ height: 50px;
125
185
  }
186
+
126
- ul.thumbs {
187
+ div.controls {
127
- clear: both;
128
- margin: 0;
188
+ margin-top: 0;
129
- padding: 0;
189
+ height: 0;
130
190
  }
191
+
192
+ .nav-controls a:nth-child(1) {
131
- ul.thumbs li {
193
+ position: absolute;
194
+ top: 50%;
132
- float: left;
195
+ left: 2%;
196
+ width: 60px;
197
+ background: #a9927b;
198
+ height: 60px;
199
+ z-index: 2;
200
+ -webkit-transform: translateY(-50%);
201
+ transform: translateY(-50%);
202
+ border-radius: 1em;
203
+ -webkit-transition: .5s;
204
+ transition: .5s;
133
- padding: 0;
205
+ opacity: .8;
134
- margin: 5px 10px 5px 0;
135
- list-style: none;
136
206
  }
207
+
208
+ .nav-controls a:nth-child(1)::before {
137
- a.thumb {
209
+ content: "";
138
- padding: 2px;
210
+ width: 100%;
211
+ height: 100%;
139
- display: block;
212
+ display: block;
213
+ top: 0;
214
+ left: 0;
215
+ background-image: url(left.svg);
216
+ background-repeat: no-repeat;
217
+ -webkit-transform: rotate(180deg);
218
+ transform: rotate(180deg);
219
+ position: absolute;
140
- border: 1px solid #ccc;
220
+ background-size: 45%;
221
+ background-position: center,center;
141
222
  }
223
+
142
- ul.thumbs li.selected a.thumb {
224
+ .nav-controls a:nth-child(2) {
225
+ position: absolute;
226
+ top: 50%;
227
+ right: 2%;
228
+ width: 60px;
143
- background: #000;
229
+ background: #a9927b;
230
+ height: 60px;
231
+ z-index: 2;
232
+ -webkit-transform: translateY(-50%);
233
+ transform: translateY(-50%);
234
+ border-radius: 1em;
235
+ -webkit-transition: .5s;
236
+ transition: .5s;
237
+ opacity: .8;
144
238
  }
239
+
240
+ .nav-controls a:nth-child(2)::before {
241
+ content: "";
242
+ width: 100%;
243
+ height: 100%;
145
- a.thumb:focus {
244
+ display: block;
245
+ top: 0;
246
+ left: 0;
247
+ background-image: url(left.svg);
248
+ background-repeat: no-repeat;
146
- outline: none;
249
+ position: absolute;
250
+ background-size: 45%;
251
+ background-position: center,center;
147
252
  }
253
+
254
+ .nav-controls a:nth-child(1):hover, .nav-controls a:nth-child(2):hover {
255
+ background: #a9927b;
148
- ul.thumbs img {
256
+ -webkit-transition: .5s;
149
- border: none;
257
+ transition: .5s;
150
- display: block;
151
258
  }
259
+
152
- div.pagination {
260
+ div.pagination a {
153
- clear: both;
261
+ background: #FFF;
154
262
  }
263
+
155
- div.navigation div.top {
264
+ div.pagination span.current {
156
- margin-bottom: 12px;
157
- height: 11px;
265
+ font-weight: bold;
266
+ background-color: #6f6255;
267
+ border-color: #6f6255;
268
+ color: #fff;
158
269
  }
270
+
159
271
  div.navigation div.bottom {
160
- margin-top: 12px;
272
+ margin-top: 10px;
273
+ bottom: 10px;
161
274
  }
275
+
276
+ a.thumb {
277
+ padding: 6px 4px 2px 4px;
278
+ display: block;
279
+ border: 1px solid #c3bbb3;
280
+ background: #FFF;
281
+ }
282
+
162
283
  div.pagination a, div.pagination span.current, div.pagination span.ellipsis {
163
- display: block;
284
+ display: block;
164
- float: left;
165
- margin-right: 2px;
285
+ margin-right: 2px;
166
- padding: 4px 7px 2px 7px;
286
+ padding: 5px 10px 4px 10px;
167
- border: 1px solid #ccc;
287
+ border: 1px solid #6f6255;
288
+ height: 31px;
289
+ display: -webkit-box;
290
+ display: -ms-flexbox;
291
+ display: flex;
292
+ -webkit-box-align: center;
293
+ -ms-flex-align: center;
294
+ align-items: center;
295
+ float: none;
296
+ border-radius: 5em;
297
+ margin: 0 3px;
168
298
  }
299
+
169
300
  div.pagination a:hover {
170
- background-color: #eee;
301
+ background-color: #f5eadf;
171
- text-decoration: none;
302
+ text-decoration: none;
172
303
  }
304
+
305
+ .bottom.pagination a {
306
+ font-size: 1em;
307
+ }
308
+
309
+ div.pagination a {
310
+ background: #FFF;
311
+ }
312
+
313
+ div.slideshow span.image-wrapper {
314
+ display: block;
315
+ position: absolute;
316
+ top: 0;
317
+ left: 0;
318
+ border: 1px solid #ceb9a4;
319
+ padding: 5px;
320
+ width: 100%;
321
+ }
322
+
173
323
  div.pagination span.current {
174
- font-weight: bold;
324
+ font-weight: bold;
175
- background-color: #000;
325
+ background-color: #6f6255;
176
- border-color: #000;
326
+ border-color: #6f6255;
177
- color: #fff;
327
+ color: #fff;
178
328
  }
329
+
179
- div.pagination span.ellipsis {
330
+ div.content a, div.navigation a {
331
+ text-decoration: none;
180
- border: none;
332
+ color: #333;
333
+ font-size: .8em;
181
- padding: 5px 0 3px 2px;
334
+ line-height: 18px;
182
335
  }
336
+ @media screen and (max-width: 880px) {
337
+ .detail_img_inner {
338
+ display: block;
339
+ height: auto !important;
340
+ }
341
+ #gallery.content {
342
+ width: 100%;
343
+ margin: 0 auto;
344
+ }
345
+ .nav-controls a:nth-child(1) {
346
+ width: 12%;
347
+ left: 2%;
348
+ }
349
+ .nav-controls a:nth-child(2) {
350
+ width: 12%;
351
+ right: 2%;
352
+ }
353
+ #thumbs.navigation {
354
+ float: none;
355
+ width: 100%;
356
+ margin-right: 0;
357
+ background: #f7f3ef;
358
+ position: static;
359
+ text-align: center;
360
+ padding: .5%;
361
+ display: block;
362
+ margin: 2.5em 0 0 0;
363
+ }
364
+ ul.thumbs {
365
+ display: -ms-flexbox;
366
+ display: -webkit-box;
367
+ display: flex;
368
+ -webkit-box-orient: vertical;
369
+ -webkit-box-direction: normal;
370
+ -ms-flex-flow: unset;
371
+ flex-flow: unset;
372
+ overflow-x: scroll;
373
+ overflow-y: unset;
374
+ }
375
+ ul.thumbs li {
376
+ width: calc(25% - 10px);
377
+ margin: 4px 4px 10px 6px;
378
+ -webkit-box-flex: 0;
379
+ -ms-flex: 0 0 100px;
380
+ flex: 0 0 100px;
381
+ min-width: 80px;
382
+ }
383
+ ul.thumbs img {
384
+ border: none;
385
+ display: block;
386
+ width: 100px;
387
+ }
388
+ }
183
389
  ```
184
390
  ```javascript
185
391
  var gallery = $('#thumbs').galleriffic({