html - 如何为 Bootstrap 表类 'table table-bordered ' 自定义 css?它不适合我

标签 html css twitter-bootstrap

我是网页设计新手。请帮忙。

我正在使用 bootstrap 3.0。我有一张包含以下数据的表格....

<table class="table table-bordered" width="100%">
<thead>
    <tr>
        <th>Column 1</th>
        <th>Column 1</th>
        <th>Column 1</th>
    </tr>
</thead>
<tbody>
    <tr class="found">
        <td>hello</td>
        <td>hello</td>
        <td>hello</td>
    </tr>
    <tr class="found">
        <td>hello</td>
        <td>hello</td>
        <td>hello</td>
    </tr>
    <tr class="found">
        <td>hello</td>
        <td>hello</td>
        <td>hello</td>
    </tr>
    <tr class="found">
        <td>hello</td>
        <td>hello</td>
        <td>hello</td>
    </tr>
    <tr class="found">
        <td>hello</td>
        <td>hello</td>
        <td>hello</td>
    </tr>
    <tr class="found">
        <td>hello</td>
        <td>hello</td>
        <td>hello</td>
    </tr>
</tbody>

我想使用带有以下自定义类的自定义 site.css 文件..

我想为“table”和“table-bordered”使用类选择器。 所以我的代码如下所示。类名是破折号。

   table.table-bordered.dash {
    width:100%
    }

所以第一行代码是这样的...

<table class="dash">

而不是写作

<table class="table table-bordered" width="100%">

我想写下面这样的东西

<table class="dash">

但它不起作用..请帮助。

最佳答案

你可以对 100% 宽度执行此操作

<table class=" col-sm-12 col-md-12 col-lg-12 table table-bordered">
...
</table>

关于html - 如何为 Bootstrap 表类 'table table-bordered ' 自定义 css?它不适合我,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26526390/

相关文章:

Navbar 问题的 HTML 重组

html - 在屏幕分辨率上调整字体大小

twitter-bootstrap - 向旋转木马添加阴影

html - Bootstrap - 导航栏不下降

javascript - 更改 CSS 溢出隐藏行为

javascript - 需要显示有关手机的验证错误消息

javascript - 使用 Javascript 更改输入中子字符串的斜体和文本间距

jquery-selectors - 仅在无序列表中选择父项的正确选择器

html - 使用 bootstraps 创建的 Navbar 左右都有空白

html - 容器内的 Carousell Controller