持续创作,加速成长!这是我参与「掘金日新计划 · 10 月更文挑战」的第27天
html中画表格让表格只有横边框没有竖边框
test
{
}
table.tab td
{height:30px;
border-bottom:2px solid #6AB2E7;
border-left:0px ;border-right:0px ;
}
table.tab td.head
{
border-top:2px solid #6AB2E7;
}
html中画表格让表格只有横边框没有竖
边框,可以把“style”标签中table.tab td设置border-left:为 0px ;border-right: 为 0px ,线型和颜色不设置即可
如果border-left:和border-right: 后面加上solid(实型)并设置颜色如 #6AB2E7,则左右边框,即可显示
| 这是第一行,第一列,靠右 | 这是第一行,第二列,靠左 |
|---|---|
| 这是第二行,第一列,靠左 | 这是第二行,第二列,靠右 |
| 这是第三行,第一列, | 这是第二行,第二列, |
居中居中
篇二:html中画表格,让表格只有横边框,没有竖边框
我的实现方式是为每个td标签添加一个底部边框border-bottom,第一行的td再额外添加一个顶部边框border-top。代码如下:
test
table.tab
{
}
table.tab td
{
height:30px;
border-bottom:2px solid #6AB2E7;
border-left:0px;
border-right:0px;
}
table.tab td.head
{
border-top:2px solid #6AB2E7;
}
| 项目一: | class="head">bb |
|---|---|
| 项目二: | dd |
| 项目三: | dd |