html - 在模态中设计表格

标签 html css bootstrap-modal

所以我在模态中有一个表,我只是想不通为什么 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{
background-color:black;

干杯。

最佳答案

你需要你的 css 选择器是 table.table.table-striped .okgo 因为 .okgo 嵌套在表格内,而不是表格的一部分。为了清晰起见,我在 table.table.table-striped.okgo

之间加了一个空格

关于html - 在模态中设计表格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43214454/

相关文章:

javascript - 二维数组 Javascript

javascript - 如何防止 slideToggle 打开然后在第一次单击时关闭

html - 如何将具有固定高度的行作为带有百分比的网格中的最后一行

javascript - Bootstrap Modal 不能在 CodePen 上完全工作

html - Bootstrap 模态主体出现故障

asp.net-mvc - 如何将带有按钮的项目的 id 从项目列表传递到模态,然后从模态传递到 Controller ?

javascript - 将元素内的 Html DOM 作为字符串传递给 AngularJS Controller

php - HTML格式的mysql数据库?

php - 我无法让我的 jquery ajax post 连接到我的 php 页面

java - 视口(viewport)的 Div 高度比例