質問編集履歴
2
ブラウザとバージョン情報の記入
title
CHANGED
File without changes
|
body
CHANGED
@@ -18,6 +18,10 @@
|
|
18
18
|
理由と解決方法がわからないのでよろしくお願いします。
|
19
19
|
|
20
20
|
追記
|
21
|
+
正しく機能しているブラウザ:Safari Ver.11.1.2
|
22
|
+
問題が確認されたブラウザ:Internet Explorer Ver.11.0.70
|
23
|
+
|
24
|
+
|
21
25
|
長いですが、現状はこんな感じになってます。
|
22
26
|
|
23
27
|
HTML
|
1
現状の追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -15,4 +15,496 @@
|
|
15
15
|
(セル内の文章の折り返しではなく、セル自体の折り返しです)
|
16
16
|
編集を行っているPC(mac)ではセルは折り返さずきちんと表示されています。
|
17
17
|
|
18
|
-
理由と解決方法がわからないのでよろしくお願いします。
|
18
|
+
理由と解決方法がわからないのでよろしくお願いします。
|
19
|
+
|
20
|
+
追記
|
21
|
+
長いですが、現状はこんな感じになってます。
|
22
|
+
|
23
|
+
HTML
|
24
|
+
```ここに言語を入力
|
25
|
+
<div id="users">
|
26
|
+
<div class="example_table">
|
27
|
+
<table>
|
28
|
+
<thead>
|
29
|
+
<tr>
|
30
|
+
<th class="sort blank-no" data-sort="no">No.</th>
|
31
|
+
<th class="sort blank-img" data-sort="img">イメージ</th>
|
32
|
+
<th class="sort blank-name" data-sort="name">名前</th>
|
33
|
+
<th class="sort a" data-sort="a">A</th>
|
34
|
+
<th class="sort b" data-sort="b">B</th>
|
35
|
+
<th class="sort c" data-sort="c">C</th>
|
36
|
+
<th class="sort d" data-sort="d">D</th>
|
37
|
+
<th class="sort e" data-sort="e">E</th>
|
38
|
+
<th class="sort f" data-sort="f">F</th>
|
39
|
+
<th class="sort g" data-sort="g">G</th>
|
40
|
+
<th class="sort h" data-sort="h">H</th>
|
41
|
+
<th class="sort i" data-sort="i">I</th>
|
42
|
+
<th class="sort j" data-sort="j">J</th>
|
43
|
+
<th class="sort k" data-sort="k">K</th>
|
44
|
+
</tr>
|
45
|
+
</thead>
|
46
|
+
<tbody class="list">
|
47
|
+
<tr>
|
48
|
+
<th class="no">0</th>
|
49
|
+
<th class="img"><p>-</p></th>
|
50
|
+
<th class="name">バナナ</th>
|
51
|
+
<td class="a">1</td>
|
52
|
+
<td class="b">2</td>
|
53
|
+
<td class="c">3</td>
|
54
|
+
<td class="d">4</td>
|
55
|
+
<td class="e">5</td>
|
56
|
+
<td class="f">6</td>
|
57
|
+
<td class="g">7</td>
|
58
|
+
<td class="h">8</td>
|
59
|
+
<td class="i">9</td>
|
60
|
+
<td class="j">10</td>
|
61
|
+
<td class="k">11</td>
|
62
|
+
</tr>
|
63
|
+
<tr>
|
64
|
+
<th class="no">0</th>
|
65
|
+
<th class="img"><p>-</p></th>
|
66
|
+
<th class="name">りんご</th>
|
67
|
+
<td class="a">1</td>
|
68
|
+
<td class="b">2</td>
|
69
|
+
<td class="c">3</td>
|
70
|
+
<td class="d">4</td>
|
71
|
+
<td class="e">5</td>
|
72
|
+
<td class="f">6</td>
|
73
|
+
<td class="g">7</td>
|
74
|
+
<td class="h">8</td>
|
75
|
+
<td class="i">9</td>
|
76
|
+
<td class="j">10</td>
|
77
|
+
<td class="k">11</td>
|
78
|
+
</tr>
|
79
|
+
<tr>
|
80
|
+
<th class="no">0</th>
|
81
|
+
<th class="img"><p>-</p></th>
|
82
|
+
<th class="name">みかん</th>
|
83
|
+
<td class="a">1</td>
|
84
|
+
<td class="b">2</td>
|
85
|
+
<td class="c">3</td>
|
86
|
+
<td class="d">4</td>
|
87
|
+
<td class="e">5</td>
|
88
|
+
<td class="f">6</td>
|
89
|
+
<td class="g">7</td>
|
90
|
+
<td class="h">8</td>
|
91
|
+
<td class="i">9</td>
|
92
|
+
<td class="j">10</td>
|
93
|
+
<td class="k">11</td>
|
94
|
+
</tr>
|
95
|
+
</tbody>
|
96
|
+
</table>
|
97
|
+
</div>
|
98
|
+
</div>
|
99
|
+
```
|
100
|
+
JavaScript
|
101
|
+
```ここに言語を入力
|
102
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/list.js/1.5.0/list.min.js"></script>
|
103
|
+
<script>
|
104
|
+
var options = {
|
105
|
+
valueNames: [ 'no','img', 'name', 'a', 'b','c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', ]
|
106
|
+
};
|
107
|
+
|
108
|
+
var userList = new List('users', options);
|
109
|
+
userList.sort( '', {order : 'asc' });
|
110
|
+
</script>
|
111
|
+
|
112
|
+
<style>
|
113
|
+
.sort.desc:after {
|
114
|
+
content:"▼";
|
115
|
+
}
|
116
|
+
.sort.asc:after {
|
117
|
+
content:"▲";
|
118
|
+
}
|
119
|
+
</style>
|
120
|
+
```
|
121
|
+
|
122
|
+
CSS
|
123
|
+
```ここに言語を入力<head>
|
124
|
+
<style b="text/css">
|
125
|
+
|
126
|
+
/* example_table */
|
127
|
+
|
128
|
+
.example_table {
|
129
|
+
display: block;
|
130
|
+
position: relative;
|
131
|
+
overflow: scroll;
|
132
|
+
width: calc(100%);
|
133
|
+
height: calc(100vh);
|
134
|
+
border-collapse: collapse;
|
135
|
+
font-size: 0;
|
136
|
+
}
|
137
|
+
|
138
|
+
/* example_table セル*/
|
139
|
+
.example_table th,
|
140
|
+
.example_table td {
|
141
|
+
display: inline-block;
|
142
|
+
height: 3.0rem;
|
143
|
+
background: #fff;
|
144
|
+
font-size: 0.7rem;
|
145
|
+
white-space: nowrap;
|
146
|
+
}
|
147
|
+
|
148
|
+
/* イメージ大きさ */
|
149
|
+
img.exampleicon {
|
150
|
+
width: 3.0rem;
|
151
|
+
}
|
152
|
+
|
153
|
+
/* example_table 行*/
|
154
|
+
.example_table thead,
|
155
|
+
.example_table tbody {
|
156
|
+
display: block;
|
157
|
+
width: -webkit-max-content;
|
158
|
+
width: -moz-max-content;
|
159
|
+
width: max-content;
|
160
|
+
}
|
161
|
+
|
162
|
+
.example_table tbody th {
|
163
|
+
position: -webkit-sticky;
|
164
|
+
position: sticky;
|
165
|
+
z-index: 1;
|
166
|
+
}
|
167
|
+
|
168
|
+
.example_table thead {
|
169
|
+
position: -webkit-sticky;
|
170
|
+
position: sticky;
|
171
|
+
top: 0;
|
172
|
+
z-index: 4;
|
173
|
+
}
|
174
|
+
|
175
|
+
/* example_table 列*/
|
176
|
+
|
177
|
+
.example_table th.no,
|
178
|
+
.example_table td.no {
|
179
|
+
display: inline-block;
|
180
|
+
width: 1.3rem;
|
181
|
+
line-height: 3.0rem;
|
182
|
+
background: #fff;
|
183
|
+
left: 0rem;
|
184
|
+
z-index: 2;
|
185
|
+
}
|
186
|
+
|
187
|
+
.example_table th.img,
|
188
|
+
.example_table td.img {
|
189
|
+
display: inline-block;
|
190
|
+
width: 3.0rem;
|
191
|
+
line-height: 3.0rem;
|
192
|
+
background: #fff;
|
193
|
+
left: 0rem;
|
194
|
+
z-index: 2;
|
195
|
+
}
|
196
|
+
|
197
|
+
.example_table th.name,
|
198
|
+
.example_table td.name {
|
199
|
+
display: inline-block;
|
200
|
+
width: 10.0rem;
|
201
|
+
line-height: 3.0rem;
|
202
|
+
background: #fff;
|
203
|
+
z-index: 1;
|
204
|
+
}
|
205
|
+
|
206
|
+
.example_table th.a,
|
207
|
+
.example_table td.a {
|
208
|
+
display: inline-block;
|
209
|
+
width: 2.5rem;
|
210
|
+
line-height: 3.0rem;
|
211
|
+
background: #fff;
|
212
|
+
left: 0rem;
|
213
|
+
z-index: 1;
|
214
|
+
}
|
215
|
+
|
216
|
+
.example_table th.b,
|
217
|
+
.example_table td.b {
|
218
|
+
display: inline-block;
|
219
|
+
width: 2.0rem;
|
220
|
+
line-height: 3.0rem;
|
221
|
+
background: #fff;
|
222
|
+
}
|
223
|
+
|
224
|
+
.example_table th.c,
|
225
|
+
.example_table td.c {
|
226
|
+
display: inline-block;
|
227
|
+
width: 2.0rem;
|
228
|
+
line-height: 3.0rem;
|
229
|
+
background: #fff;
|
230
|
+
}
|
231
|
+
|
232
|
+
.example_table th.d,
|
233
|
+
.example_table td.d {
|
234
|
+
display: inline-block;
|
235
|
+
width: 1.3rem;
|
236
|
+
line-height: 3.0rem;
|
237
|
+
background: #fff;
|
238
|
+
}
|
239
|
+
|
240
|
+
|
241
|
+
.example_table th.e,
|
242
|
+
.example_table td.e {
|
243
|
+
display: inline-block;
|
244
|
+
width: 1.3rem;
|
245
|
+
line-height: 3.0rem;
|
246
|
+
background: #fff;
|
247
|
+
}
|
248
|
+
|
249
|
+
.example_table th.f,
|
250
|
+
.example_table td.f {
|
251
|
+
display: inline-block;
|
252
|
+
width: 1.3rem;
|
253
|
+
line-height: 3.0rem;
|
254
|
+
background: #fff;
|
255
|
+
}
|
256
|
+
|
257
|
+
.example_table th.g,
|
258
|
+
.example_table td.g {
|
259
|
+
display: inline-block;
|
260
|
+
width: 1.3rem;
|
261
|
+
line-height: 3.0rem;
|
262
|
+
background: #fff;
|
263
|
+
}
|
264
|
+
|
265
|
+
.example_table th.h,
|
266
|
+
.example_table td.h {
|
267
|
+
display: inline-block;
|
268
|
+
width: 1.3rem;
|
269
|
+
line-height: 3.0rem;
|
270
|
+
background: #fff;
|
271
|
+
}
|
272
|
+
|
273
|
+
|
274
|
+
.example_table th.i,
|
275
|
+
.example_table td.i {
|
276
|
+
display: inline-block;
|
277
|
+
width: 1.3rem;
|
278
|
+
line-height: 3.0rem;
|
279
|
+
background: #fff;
|
280
|
+
}
|
281
|
+
|
282
|
+
.example_table th.j,
|
283
|
+
.example_table td.j {
|
284
|
+
display: inline-block;
|
285
|
+
width: 1.3rem;
|
286
|
+
line-height: 3.0rem;
|
287
|
+
background: #fff;
|
288
|
+
}
|
289
|
+
|
290
|
+
.example_table th.k,
|
291
|
+
.example_table td.k {
|
292
|
+
display: inline-block;
|
293
|
+
width: 1.3rem;
|
294
|
+
line-height: 3.0rem;
|
295
|
+
background: #fff;
|
296
|
+
}
|
297
|
+
|
298
|
+
|
299
|
+
/* example_table 列固定場所*/
|
300
|
+
|
301
|
+
|
302
|
+
.example_table thead th.blank-no{
|
303
|
+
position: -webkit-sticky;
|
304
|
+
position: sticky;
|
305
|
+
width: 1.3rem;
|
306
|
+
line-height: 3.0rem;
|
307
|
+
top: 0;
|
308
|
+
left: 0;
|
309
|
+
z-index: 4;
|
310
|
+
}
|
311
|
+
|
312
|
+
.example_table thead th.blank-img{
|
313
|
+
position: -webkit-sticky;
|
314
|
+
position: sticky;
|
315
|
+
width: 3.0rem;
|
316
|
+
line-height: 3.0rem;
|
317
|
+
top: 0;
|
318
|
+
left: 0;
|
319
|
+
z-index: 5;
|
320
|
+
}
|
321
|
+
|
322
|
+
.example_table thead th.blank-name{
|
323
|
+
position: -webkit-sticky;
|
324
|
+
position: sticky;
|
325
|
+
width: 10.0rem;
|
326
|
+
line-height: 3.0rem;
|
327
|
+
top: 0;
|
328
|
+
left: 0rem;
|
329
|
+
z-index: 4;
|
330
|
+
}
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
</style>
|
335
|
+
</head>
|
336
|
+
|
337
|
+
```
|
338
|
+
CSS デザイン部分
|
339
|
+
```ここに言語を入力
|
340
|
+
/* デザイン */
|
341
|
+
/* design */
|
342
|
+
|
343
|
+
body {
|
344
|
+
font-family: 'Noto Sans', sans-serif;
|
345
|
+
padding: .3rem;
|
346
|
+
}
|
347
|
+
|
348
|
+
/* ボックス周り影 */
|
349
|
+
.example_table {
|
350
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
|
351
|
+
transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
|
352
|
+
}
|
353
|
+
.example_table:hover {
|
354
|
+
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
|
355
|
+
}
|
356
|
+
|
357
|
+
|
358
|
+
.example_table table {
|
359
|
+
border: 1px solid #CFD8DC;
|
360
|
+
}
|
361
|
+
|
362
|
+
|
363
|
+
/* デザイン セル*/
|
364
|
+
.example_table th {
|
365
|
+
font-weight: bold;
|
366
|
+
}
|
367
|
+
|
368
|
+
.example_table td {
|
369
|
+
font-weight: normal;
|
370
|
+
text-align: center;
|
371
|
+
}
|
372
|
+
|
373
|
+
/* デザイン tbody th*/
|
374
|
+
.example_table tbody th.no {
|
375
|
+
text-align: center;
|
376
|
+
}
|
377
|
+
|
378
|
+
.example_table tbody th.img {
|
379
|
+
text-align: center;
|
380
|
+
}
|
381
|
+
|
382
|
+
.example_table tbody th.name {
|
383
|
+
text-align: center;
|
384
|
+
}
|
385
|
+
|
386
|
+
.example_table tbody th.a {
|
387
|
+
text-align: center;
|
388
|
+
}
|
389
|
+
|
390
|
+
.example_table thead th {
|
391
|
+
background: #000000;
|
392
|
+
color: #E0E0E0;
|
393
|
+
text-align: center;
|
394
|
+
}
|
395
|
+
|
396
|
+
/* デザイン thead th*/
|
397
|
+
.example_table thead th.no {
|
398
|
+
background: #000000;
|
399
|
+
color: #E0E0E0;
|
400
|
+
font-weight: bold;
|
401
|
+
text-align: center;
|
402
|
+
}
|
403
|
+
|
404
|
+
.example_table thead th.img {
|
405
|
+
background: #000000;
|
406
|
+
color: #E0E0E0;
|
407
|
+
font-weight: bold;
|
408
|
+
text-align: center;
|
409
|
+
}
|
410
|
+
|
411
|
+
.example_table thead th.name {
|
412
|
+
background: #000000;
|
413
|
+
color: #E0E0E0;
|
414
|
+
font-weight: bold;
|
415
|
+
text-align: center;
|
416
|
+
}
|
417
|
+
|
418
|
+
.example_table thead th.a {
|
419
|
+
background: #000000;
|
420
|
+
color: #E0E0E0;
|
421
|
+
font-weight: bold;
|
422
|
+
text-align: center;
|
423
|
+
}
|
424
|
+
|
425
|
+
.example_table thead th.b {
|
426
|
+
background: #000000;
|
427
|
+
color: #E0E0E0;
|
428
|
+
font-weight: bold;
|
429
|
+
text-align: center;
|
430
|
+
}
|
431
|
+
|
432
|
+
.example_table thead th.c {
|
433
|
+
background: #000000;
|
434
|
+
color: #E0E0E0;
|
435
|
+
font-weight: bold;
|
436
|
+
text-align: center;
|
437
|
+
}
|
438
|
+
|
439
|
+
.example_table thead th.d {
|
440
|
+
background: #000000;
|
441
|
+
color: #E0E0E0;
|
442
|
+
font-weight: bold;
|
443
|
+
text-align: center;
|
444
|
+
}
|
445
|
+
|
446
|
+
.example_table thead th.e {
|
447
|
+
background: #000000;
|
448
|
+
color: #E0E0E0;
|
449
|
+
font-weight: bold;
|
450
|
+
text-align: center;
|
451
|
+
}
|
452
|
+
|
453
|
+
.example_table thead th.f {
|
454
|
+
background: #000000;
|
455
|
+
color: #E0E0E0;
|
456
|
+
font-weight: bold;
|
457
|
+
text-align: center;
|
458
|
+
}
|
459
|
+
|
460
|
+
.example_table thead th.g {
|
461
|
+
background: #000000;
|
462
|
+
color: #E0E0E0;
|
463
|
+
font-weight: bold;
|
464
|
+
text-align: center;
|
465
|
+
}
|
466
|
+
|
467
|
+
.example_table thead th.h {
|
468
|
+
background: #000000;
|
469
|
+
color: #E0E0E0;
|
470
|
+
font-weight: bold;
|
471
|
+
text-align: center;
|
472
|
+
}
|
473
|
+
|
474
|
+
.example_table thead th.i {
|
475
|
+
background: #000000;
|
476
|
+
color: #E0E0E0;
|
477
|
+
font-weight: bold;
|
478
|
+
text-align: center;
|
479
|
+
}
|
480
|
+
|
481
|
+
.example_table thead th.j {
|
482
|
+
background: #000000;
|
483
|
+
color: #E0E0E0;
|
484
|
+
font-weight: bold;
|
485
|
+
text-align: center;
|
486
|
+
}
|
487
|
+
|
488
|
+
.example_table thead th.k {
|
489
|
+
background: #000000;
|
490
|
+
color: #E0E0E0;
|
491
|
+
font-weight: bold;
|
492
|
+
text-align: center;
|
493
|
+
}
|
494
|
+
|
495
|
+
.example_table tbody tr:nth-child(even) th {
|
496
|
+
background: #222222;
|
497
|
+
color: #FFFFFF;
|
498
|
+
}
|
499
|
+
.example_table tbody tr:nth-child(even) td {
|
500
|
+
background: #f0f0f0;
|
501
|
+
}
|
502
|
+
.example_table tbody tr:nth-child(odd) th {
|
503
|
+
background: #222222;
|
504
|
+
color: #FFFFFF;
|
505
|
+
}
|
506
|
+
.example_table tbody tr:nth-child(odd) td {
|
507
|
+
background: #FAFAFA;
|
508
|
+
}
|
509
|
+
|
510
|
+
```
|