html消除双边框,HTML中Table去掉两边的边框

本文介绍了一种在HTML中去除表格左右边框的方法,并通过CSS样式实现了这一效果。通过设置特定的CSS属性,可以有效地调整表格外观,使其更加美观且符合设计需求。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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

cee65b7667689a8bedd3c9e90a888b16.png

附上原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;

}

人员信息

姓名性别年龄出生日期地址
小明201998-10-12北京市
小花191999-02-02上海市
小强221996-05-04上海市

im

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值