HTML中Table去掉左右两边的边框
.table {
text-align: center;
}
.table table {
font-size: 14px;
border-collapse: collapse;
width: 70%;
table-layout: fixed;
text-align: center;
line-height: 25px;
margin:0 auto;
}html
.table table tr {
border: dashed 1px #a59e9e;
border-left: none;
border-right: none;
}htm
效果如图所示:blog

附上原html代码:it
io
Table去掉左右两边的边框.table {
text-align: center;
}
.table table {
font-size: 14px;
border-collapse: collapse;
width: 70%;
table-layout: fixed;
text-align: center;
line-height: 25px;
margin:0 auto;
}table
.table table tr {
border: dashed 1px #a59e9e;
border-left: none;
border-right: none;
}
人员信息
| 姓名 | 性别 | 年龄 | 出生日期 | 地址 |
| 小明 | 男 | 20 | 1998-10-12 | 北京市 |
| 小花 | 女 | 19 | 1999-02-02 | 上海市 |
| 小强 | 男 | 22 | 1996-05-04 | 上海市 |
im
本文介绍了一种在HTML中去除表格左右边框的方法,并通过CSS样式实现了这一效果。通过设置特定的CSS属性,可以有效地调整表格外观,使其更加美观且符合设计需求。
1456

被折叠的 条评论
为什么被折叠?



