繁体   English   中英

桌子边框垂直和水平不相交

[英]table borders vertical and horizontal not meeting

我有一个简单的表格,我只是想在某些单元格周围设置边框。

 .comments .b { border-bottom: 1px solid #919295; } .comments .t { border-top: 1px solid #919295; } .comments .l { border-left: 1px solid #919295; } .comments .r { border-right: 1px solid #919295; } 
 <table align='center' width='100%' class='comments'> <tr> <th width='15%' class='r b'>val</th> <th width='45%'>ba</th> <th width='40%'>"sadf</th> </tr> <tr> <th width='15%' class='r b'>"dsf</th> <th rowspan='2' colspan='2'>"sdf</th> </tr> <tr height='60px'><th colspan='3'>&nbsp;</th></tr> <tr height='35px'><th>&nbsp;</th><th colspan='2'>&nbsp;</th></tr> </table> 

结果是:

在此处输入图片说明

如何删除箭头所示的空格?

我尝试过border-spacing: 0px;

table {
  border-collapse: collapse;
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM