css样式表格设置

如图,怎么把每个单元格之间的白色区间去掉呢

 

CSS控制表格边框样式问题

<html>

<head><title>HTML Table</title></head>

<style type="text/css">

TABLE {

border-collapse: separate;

border: 2px solid blue; }

 

.one{ border-left:none; border-right:1px solid #f00; border-top:1px solid #f00; border-bottom:1px solid #f00;}

</style>

<body>

<table summary="TechRepublic.com - Tables and CSS">

 

<thead><tr>

<thabbr="salesperson" scope="col">Person</th>

<thabbr="sales" scope="col">Sales</th>

</tr></thead>

<tbody><tr>

<td class="one">Mr. Smith</td>

<td>600.00</td>

</tr><tr>

<td>Mr. Jones</td>

<td>0000.00</td>

</tr><tr>

<td>Ms. Williams</td>

<td class="one">0000.00</td>

</tr></tbody>

<tfoot><tr>

<td>Let's sale, sale, sale!</td>

</tr></tfoot></table></body></html>

 

我设置了一个样式one,单元格左边没有边框,上下和右边有边框,颜色你可以自己设置。

原文地址:https://www.cnblogs.com/weixiao/p/2208209.html