Html Boostrap只删除一个单元格
我目前正在使用引导处理一个表,我想隐藏或删除该表中的单元格 屏幕:(我发布链接,因为我无法发布图像^^) 所以我想隐藏或删除红色的单元格,我没有看到任何解决方案 编辑:Html Boostrap只删除一个单元格,html,css,twitter-bootstrap,Html,Css,Twitter Bootstrap,我目前正在使用引导处理一个表,我想隐藏或删除该表中的单元格 屏幕:(我发布链接,因为我无法发布图像^^) 所以我想隐藏或删除红色的单元格,我没有看到任何解决方案 编辑: <div class="widget stacked widget-table action-table"> <div class="widget-content"> <t
<div class="widget stacked widget-table action-table">
<div class="widget-content">
<table class="table table-striped table-bordered">
<thead>
<tr>
<th></th>
<th>Avant</th>
<th>Aujourd'hui</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="3" class="text-center" style="background-color:#C0C0C0;"><strong>Catégorie 1</strong></td>
</tr>
<tr>
<td>Check1</td>
<td>20</td>
<td>40</td>
</tr>
<tr>
<td>Check1</td>
<td>20</td>
<td>40</td>
</tr>
<tr>
<td colspan="3" class="text-center" style="background-color:#C0C0C0;"><strong>Catégorie 2</strong></td>
</tr>
<tr>
<td>Check2</td>
<td>Oui</td>
<td>Oui</td>
</tr>
<tr>
<td>Check2</td>
<td>Oui</td>
<td>Non</td>
</tr>
</tbody>
</table>
</div>
</div>
前卫的
奥朱尔德回族
Catégorie 1
支票1
20
40
支票1
20
40
Catégorie 2
支票2
是的
是的
支票2
是的
不
一个解决方案是用示例隐藏这个额外的
table thead tr th:first-child {
background: none;
}
或与
/* Better if there is content in it, or if there is no background defined at start */
table thead tr th:first-child {
opacity: 0;
}
有几种CSS
方法可以做到这一点,但我就是这么做的。希望你有这个想法
因为你已经有了一些内联CSS
,如果你不知道如何处理这个CSS
,你也可以用内联CSS
的方式来做,即使它显然没有其他方式干净
<thead>
<tr>
<th style="opacity: 0;"></th>
<th>Avant</th>
<th>Aujourd'hui</th>
</tr>
</thead>
前卫的
奥朱尔德回族
JsFiddle:
背景:无代码>解决方案:
opacity:0代码>解决方案:是静态的
?如果是这种情况,您只需在“avant”前面添加一个空的
。否则,您能提供一个JSFIDLE来帮助我们帮助您吗对不起,我误解了你的问题,现在发布答案。不,我不是在搜索。我不想跨过第二节,我想要这样的结果:(绿色是我身体的背景)这就是为什么我要小提琴的原因我正在编辑我的答案,所以现在请看一看。这里并不是一个可以复制/使用的通用代码,但更多的是我的想法。我不知道您在CSS
方面的水平,因此,我再次希望您能够根据您的情况调整此解决方案。@wow您解决了问题吗?如果是的话,你能接受这个答案吗?奇怪的是,不透明和背景:没有不起作用。但是我可以修改单元格的背景颜色。。。