如何设置此表数据来自数据库的表的标头的固定位置,其中不同的查询具有不同的表?每个查询中的标题都不同。截至目前,我只发送了表格的代码,并在页面的底部幻灯片中使用。
#datatable {
width: 100 % ;
text - align: center;
border: 1 px solid #000;
border-collapse:collapse;
cursor:pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
font-size:small;
}
#datatable thead {
background: aquamarine;
}
#datatable thead tr {
border - bottom: 1 px solid# aaa;
}
#datatable tbody, tr {
border - bottom: 1 px solid# aaa;
}
#datatable th, td {
border - right: 1 px solid# aaa;
}

<div id="queryTableId" style="float: left; height: 170px; width: 75%; overflow: scroll;">
<table id="datatable" st-table="displayCollection" st-safe-src="dataList[0].data.rows" class="table table-striped" ng-hide="queryTableHidden">
<thead>
<tr style="height:30px;">
<th ng-repeat="column in dataList[0].data.cols" st-sort="{{column}}">{{column | uppercase}}</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="row in displayCollection" ng-click="selectedFeature(row,$index)" id="row-{{$index}}" style="height: 20px;">
<td ng-repeat="item in row">{{ item }}</td>
</tr>
</tbody>
</table>
</div>
&#13;