<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>表头和第一列固定</title>
<style>
*{
padding: 0;
margin: 0;
}
html,body{
width: 100%;
height: 100%;
}
.wrap{
width: 100%;
position: relative;
}
.box{
width: 100%;
overflow-x: auto;
}
.table{
padding-top: 36px;
border-collapse: collapse;
}
.table>thead{
width: 100%;
position: fixed;
overflow: hidden;
top: 0;
left: 0;
background-color: #fff;
z-index: 98;
}
th,td{
min-width: 85px;
text-align: center;
line-height: 36px;
border: 1px solid #ccc;
}
.table>tbody tr>td:nth-of-type(2){
padding-left: 85px;
}
.table>tbody tr>td:first-child{
position: absolute;
left: 0;
background-color: #fff;
z-index: 97;
}
.first_trh th:first-child{
position: fixed;
left: 0;
top: 0;
background-color: #fff;
z-index: 99;
}
.first_trh th:nth-of-type(2){
padding-left: 85px;
}
</style>
</head>
<body>
<div class="wrap">
<div class="box">
<table class="table">
<thead>
<tr class="first_trh">
<th>行号头</th>
<th>TH002</th>
<th>TH003</th>
<th>TH004</th>
<th>TH005</th>
<th>TH006</th>
<th>TH007</th>
<th>TH008</th>
<th>TH009</th>
<th>TH010</th>
<th>TH011</th>
<th>TH012</th>
<th>TH013</th>
<th>TH014</th>
<th>TH015</th>
<th>TH016</th>
<th>TH017</th>
<th>TH018</th>
<th>TH019</th>
<th>TH020</th>
</tr>
</thead>
<tbody>
<tr>
<td>行号01</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号02</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号03</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号04</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号05</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号06</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号07</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号08</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号09</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号10</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号11</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号12</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号13</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号14</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号15</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号16</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号17</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号18</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号19</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号20</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号21</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号22</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号23</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号24</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号25</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号26</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号27</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号28</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号29</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号30</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号31</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号32</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号33</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号34</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号35</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号36</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号37</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号38</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号39</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号40</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号41</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号42</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号43</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号44</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号45</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号46</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号47</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号48</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号49</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
<tr>
<td>行号50</td>
<td>con001</td>
<td>con002</td>
<td>con003</td>
<td>con004</td>
<td>con005</td>
<td>con006</td>
<td>con007</td>
<td>con008</td>
<td>con009</td>
<td>con010</td>
<td>con011</td>
<td>con012</td>
<td>con013</td>
<td>con014</td>
<td>con015</td>
<td>con016</td>
<td>con017</td>
<td>con018</td>
<td>con019</td>
</tr>
</tbody>
</table>
</div>
</div>
<script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js">
</script>
<script type="text/javascript">
$(window).resize(function () { //当浏览器大小变化时
$('.table thead').width($('.box').width());
$('.first_trh').width($('.table').width());
});
$('.box').on('scroll',function(){
// 将thead头部和外部容器滚动条绑定,同步移动
$('.table thead').scrollLeft($(this).scrollLeft());
});
/*
* 按下拖拽
* ele 元素选择器 #id,.class
*/
function sl_dragmove(ele){
$(document).on('mousedown',ele,function(e_wrap){
var _that = $(this);
$(_that).css('cursor','move').css('user-select','none');
$(this).mouseleave(function(e_c1){
$(_that).unbind('mousemove');
$(_that).css('cursor','default');
});
$(this).mouseup(function(e_c2){
$(_that).unbind('mousemove');
$(_that).css('cursor','default');
});
var original_left = $(_that).scrollLeft()+e_wrap.clientX;
$(this).mousemove(function(e_c3){
$(_that).scrollLeft(original_left-e_c3.clientX);
});
})
}
sl_dragmove('.box');
</script>
</body>
</html>