CSS: How to set the table cell margin to 0?

This question already has an answer here:

  • Set cellpadding and cellspacing in CSS? 26 answers

  • 试试这个https://jsfiddle.net/2Lzo9vfc/84/

    table {
      border-collapse: collapse;
      border-spacing: 0;
    }
    

    You're missing padding: 0px; for the

    test, th, td {}

    #test, th, td {
    border:1px solid black;
    margin:0px;
    padding:0px;
    
    }
    
    链接地址: http://www.djcxy.com/p/16944.html

    上一篇: 如何减少html表中两列之间的空间

    下一篇: CSS:如何将表单元格边距设置为0?