我想要隐藏表格单元格的边框。
如何使用css做到这一点? 如图所示,我需要隐藏标记的边框(如第三行和第二行)。
答案 0 :(得分:2)
<style>
table {
border: 1px solid black;
width:100%;
}
table tr {
border: 1px solid black;
}
table th {
border: none;
}
</style>
<table>
<thead>
<tr>
<th class="col1">1</th>
<th class="col2">2</th>
<th class="col3">3</th>
</tr>
</thead>
</thead>
答案 1 :(得分:1)
试试这个
border-collapse:collapse;
答案 2 :(得分:1)
尝试
td.col1
{
border-left:0px;
}
答案 3 :(得分:1)
试试这个。
table {
border: 1px solid black;
width:100%;
border-collapse:collapse;
}
答案 4 :(得分:0)