【发布时间】:2017-03-20 21:35:41
【问题描述】:
有人可以看看这个问题吗?
滚动条显示一个表格,而另一个表格没有显示,该表格由相同的 CSS 和 HTML 文件组成。
HTML 表格不显示滚动
<div class="wrapper">
<table class="professional">
<tbody>
<tr>
<th class="tableheader" ng-show="accountInfo.accountId > 0">Account Number</th>
<th class="tableheader" ng-show="accountInfo.accountId > 0" >First Name</th>
<th class="tableheader" ng-show="accountInfo.accountId > 0">Last Name</th>
<th class="tableheader" ng-show="accountInfo.accountId > 0">Status</th>
<th class="tableheader" ng-show="accountInfo.accountId > 0">Services</th>
<th class="tableheader" ng-show="accountInfo.accountId > 0">Suspend Status</th>
<th class="tableheader" ng-show="accountInfo.accountId > 0">Phone Number</th>
<th class="tableheader" ng-show="accountInfo.accountId > 0">Activation Code</th>
<th class="tableheader" ng-show="accountInfo.accountId > 0">SSO ID</th>
</tr>
<tr>
<td class="features" >{{accountInfo.accountId}}</td>
<td class="features" >{{accountInfo.firstName}}</td>
<td class="features" >{{accountInfo.lastName}}</td>
<td class="features" >{{accountInfo.status}}</td>
<td class="features" >{{accountInfo.group}}</td>
<td class="features" >{{accountInfo.suspended}}</td>
<td class="features" >{{accountInfo.homePhone}}</td>
<td class="features" >{{accountInfo.activationCode}}</td>
<td class="features" >{{accountInfo.guid}}</td>
</tr>
</tbody>
</table>
</div>
显示滚动的 HTML 表格
<div class="wrapper">
<table class="professional">
<tbody>
<tr>
<th class="tableheader" ng-repeat="list in cellularIPAddressValue">{{list.deviceType}}
</th>
</tr>
<tr>
<td class="features" ng-repeat="list in cellularIPAddressValue">{{list.instanceId}}
</td>
</tr>
<tr>
<td class="features" ng-repeat="list in cellularIPAddressValue">{{list.firmwareVersion}}
</td>
</tr>
<tr>
<td class="features" ng-repeat="list in cellularIPAddressValue">{{list.manufacturer}}
</td>
</tr>
<tr>
<td class="features" ng-repeat="list in cellularIPAddressValue">{{list.model}}
</td>
</tr>
<tr>
<td class="features" ng-repeat="list in cellularIPAddressValue">
{{list.troubles[0].description}}
<p ng-show="list.troubles[0]">Failure On {{list.troubles[0].date}}
</p>
</td>
</tr>
</tbody>
</table>
</div>
CSS:
.wrapper {
overflow: scroll;
width: 1350px;
white-space: nowrap;
padding-bottom: 10px;
padding-top: 10px;
}
.professional .title {
padding-top: 10px;
background: #2980b9;
}
.professional .tableheader, .professional .pt-footer {
background: #2980b9;
}
.professional .tableheader:after {
border-top-color: #2980b9;
}
.professional .pt-footer:after {
border-top-color: #FFFFFF;
}
【问题讨论】:
-
似乎第一个表没有足够的数据滚动。您需要更多标题和内容才能看到滚动
-
如果你看到第一个表标题在同一页面内缩小,它就有足够的数据
标签: html css scroll html-table overflow