我是网页设计新手。请帮忙。
我正在使用 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/