我有一个HTML表,我想样式表的字体,更改字体颜色表日
table,
thead,
th {
color: white;
border: 1px solid black;
}
<table class="table table-bordered">
<thead>
<tr style="background-color:#3173AD;">
<th>Action</th>
<th style="color:white; font-size:10pt;">User Name</th>
<th style="color:white; font-size:10pt;">User Type</th>
<th style="color:white; font-size:10pt;">Department</th>
<th style="color:white; font-size:10pt;">Mobile Number</th>
<th style="color:white; font-size:10pt;" ng-hide="true"></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="data in getdata">
<td>
<a href="#" ng-click="update(data)" class="btn btn-warning active fa fa-edit"></a>
<a href="#" ng-click="delete(data)" class="btn btn-danger active fa fa-remove"></a>
</td>
<td>{{data.Username}}</td>
<td>{{data.usertype}}</td>
<td>{{data.designation}}</td>
<td>{{data.mobilenumber}}</td>
<td ng-hide="true">{{data.userautoid}}</td>
<td ng-hide="true">{{data.profile}}</td>
<td ng-hide="true">{{data.picname}}</td>
<td ng-hide="true">{{data.email}}</td>
<td ng-hide="true">{{data.hod}}</td>
</tr>
</tbody>
</table>
但th
字体颜色没有改变
的下面是我用,但我无法改变颜色
<th style="">User Name</th>
,这就是我现在做的来解决这个
<th style="color:white; font-size:10pt;" ng-hide="true"></th>
这工作正常,但我想使用的CSS类
更重要的是我现在需要做什么?
你放的css的定义,必须工作 –
它似乎对我很好:https://jsfiddle.net/rcygmh08/ – Toastrackenigma
这可能是你的CSS文件没有被应用,你有一个覆盖它的规则(即稍后在CSS或内联中应用相同的选择器),则会有更具体的规则优先。首先,对于特定风格的表格应用类可能是一个不错的主意,因此只有你想要的表格才能被样式化,然后Chrome/Firefox的开发工具可以帮助检查哪些规则没有被应用或者懒惰 - 颜色:白色!重要的;''除非有另一个'重要的'规则被应用于'颜色',否则prob将导致它被应用 – Brian