我怎样才能为bootstrap table class' table table-bordered&#39 ;?做自定义css?它不适合我

时间:2014-10-23 10:44:34

标签: 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文件..

我想将类选择器用于&#34; table&#34;和&#34;表镶上&#34 ;. 所以我的代码如下所示..类名是破折号。

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

所以第一行代码就像这样...

<table class="dash">

而不是写

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

我想写下面的内容

<table class="dash">

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

1 个答案:

答案 0 :(得分:0)

你可以100%宽度

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