table表格边框样式:
推荐这种
原理:
只对table td设置左与上边框;
对table设置右与下边框;
<style>
.table-c table{border-right:1px solid #F00;border-bottom:1px solid #F00}
.table-c table td{border-left:1px solid #F00;border-top:1px solid #F00}
</style>
从实用角度出发,最好不要规定边框,而是使用 CSS 来添加边框样式和颜色。
周围的边框设置为 1 像素宽
这种简单粗暴。。。但最后还是要改样式颜色
<table border="1">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table>
表格td画斜线
<style>
td[class=bob]:before{
content: "";
position: absolute;
width: 1px;
height:164px;/* 需要手调 ,线的长度 */
top:171; /* 需要手调 ,线的位置*/
left:57;
background-color: white; /* 线的颜色 black */
display: block;
transform: rotate(-74deg);/* 需要手调 ,斜线的角度*/
transform-origin: top;
}
</style>