您的位置:首页 > Web前端 > CSS

table消除 td 之间的间距

2016-05-30 13:49 274 查看
有两种方式可以实现

1.<table cellspacing="0">

2.css 的border-collapse:collapse样式

通过上面的方法可以实现这样的效果



具体的 css 代码

.dir{
width: 400px;
height: 150px;
text-align: center;
[b]margin-top: 20px;
margin-left: 20px;
border-left: #eeeeee solid 1px;
border-top:#eeeeee solid 1px;
border-collapse:collapse;
}
.dir td{
width:25%;
border-right: #eeeeee solid 1px;
border-bottom: #eeeeee solid 1px;
}

.dir th{
width: 25%;
border-bottom: 1px solid #eeeeee;
border-right: 1px solid #eeeeee;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  css html table th td