forked from mdbootstrap/TW-Elements
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtable-content.html
67 lines (66 loc) · 1.57 KB
/
table-content.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<!DOCTYPE html>
<html>
<head>
<link href="../css/perfect-scrollbar.css" rel="stylesheet">
<script src="../dist/perfect-scrollbar.js"></script>
<style>
#table {
font-size: 20px;
}
#table thead, #table tbody, #table tr {
display: block;
width: 600px;
border-spacing: 0;
border-collapse: collapse;
}
#table tbody {
height: 100px;
overflow-y: auto;
overflow-x:hidden;
position: relative;
border-bottom: 1px solid black;
}
#table tbody td, #table thead th {
display: block;
border: 1px solid black;
width: 200px;
float: left;
box-sizing: border-box;
}
</style>
</head>
<body>
<div id="table" class="wrapper">
<table id='table'>
<thead>
<tr>
<th>Name</th><th>Age</th><th>Occupation</th>
</tr>
</thead>
<tbody>
<tr>
<td>Alex</td><td>20</td><td>Student</td>
</tr>
<tr>
<td>Paul</td><td>23</td><td>Engineer</td>
</tr>
<tr>
<td>Chris</td><td>19</td><td>Human being</td>
</tr>
<tr>
<td>Satoshi</td><td>30</td><td>Pokemon trainer</td>
</tr>
<tr>
<td>Jun</td><td>27</td><td>Hero</td>
</tr>
<tr>
<td>Yong</td><td>27</td><td>Money maker</td>
</tr>
</tbody>
</table>
</div>
<script>
new PerfectScrollbar('#table tbody');
</script>
</body>
</html>