Html 在模型中设计表
所以我在一个模态中有一个表,我就是不明白为什么css没有做任何事情。我错过了什么Html 在模型中设计表,html,css,bootstrap-modal,Html,Css,Bootstrap Modal,所以我在一个模态中有一个表,我就是不明白为什么css没有做任何事情。我错过了什么 <table class="table table-striped"> <thead class="okgo"> <tr> <th>MissionType</th>
<table class="table table-striped">
<thead class="okgo">
<tr>
<th>MissionType</th>
<th>MissionDate</th>
<th>ElipseNumber</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>@ViewBag.SelectedMission.MissionType</td>
<td>@ViewBag.SelectedMission.MissionDate</td>
<td>@ViewBag.SelectedMission.ElipseNumber</td>
<td>@ViewBag.SelectedMission.Notes</td>
</tr>
</tbody>
</table>
}
干杯。您需要将css选择器设置为
table.table.table-striped.okgo
,因为.okgo
嵌套在表中,而不是表的一部分。编辑为了清晰起见,我在table.table.table striped
和.okgo
之间放了一个空格,结果发现问题出在我的浏览器中。ctrl+f5组合键解决了这个问题。谢谢你,不幸的是,仍然没有正确加载css文件,或者其他css规则正在覆盖这个css规则。是的,是我的浏览器没有更新css。谢谢。
table.table.table-striped.okgo{
background-color:black;