Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/69.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 在模型中设计表_Html_Css_Bootstrap Modal - Fatal编程技术网

Html 在模型中设计表

Html 在模型中设计表,html,css,bootstrap-modal,Html,Css,Bootstrap Modal,所以我在一个模态中有一个表,我就是不明白为什么css没有做任何事情。我错过了什么 <table class="table table-striped"> <thead class="okgo"> <tr> <th>MissionType</th>

所以我在一个模态中有一个表,我就是不明白为什么css没有做任何事情。我错过了什么

<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;