嗨,我想从 html 表格中删除垂直线,并且只有特定的垂直线要在我的 html 表格中删除,只有 3 条垂直线,我只想删除 1 和 3 行
这是我的代码
<html>
<head>
<style type="text/css">
.table1{
background: -moz-linear-gradient(-90deg, #003471, #448CCB);
background: -webkit-gradient(linear, left top, left bottom, from(#003471), to(#448CCB));
}
table, th, td {
border-left: none;
border-right: none;
}
</style>
</head>
<body>
<div id="div1" class='display'>
<table width="100%" border="1" align="center" cellpadding="0" cellspacing="1" bordercolor='66A8FF'>
<tr class="table1" style="border-collapse:collapse">
<td width="25%" height="48px" align="center" style="font-size:28px"><font color="#fff">Text1</font></td>
<td width="25%" height="48px" align="center" style="font-size:28px"><font color="#fff">Text2</font></td>
<td width="25%" height="48px" align="center" style="font-size:28px"><font color="#fff">Text3</font></td>
<td width="25%" height="48px" align="center" style="font-size:28px"><font color="#fff">Text4</font></td>
</tr>
<tr class="table1" style="border-collapse:collapse">
<td width="25%" height="48px" align="center" style="font-size:28px"><font color="#fff">Text1</font></td>
<td width="25%" height="48px" align="center" style="font-size:28px"><font color="#fff">Text2</font></td>
<td width="25%" height="48px" align="center" style="font-size:28px"><font color="#fff">Text3</font></td>
<td width="25%" height="48px" align="center" style="font-size:28px"><font color="#fff">Text4</font></td>
</tr>
</table>
</div>
</body>
</html>
这是我的 JSFiddle
我怎样才能实现我的目标
提前致谢
最佳答案
Demo Fiddle
使用CSS:
table{
border-collapse:collapse;
}
td:nth-child(2){
border-right:1px solid white;
}
关于html - 如何从html表格中删除垂直线?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23561585/