html – 为什么页边距填充在表td和tr中不起作用?

前端之家收集整理的这篇文章主要介绍了html – 为什么页边距填充在表td和tr中不起作用?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

  1. 为什么我不能为trtd添加保证金填充?我希望td(< td style =“background-color:#757575;”> 11194< / td>)具有margin-right.namely,每个都用一些空格分隔.但无法奏效.如何纠正它.并且第二个tr在以下tr之间有一些空格.

  2. 最佳答案
    表格单元格忽略边距规范
    参见:http://www.w3.org/TR/CSS2/tables.html
    CSS Cell Margin

  3. Internal table elements generate rectangular Boxes with content and

  4. borders. Cells have padding as well. Internal table elements do not

  5. have margins.

  6. 如果你想添加填充,只需设置border-collapse:单独
    参考:http://www.w3schools.com/cssref/playit.asp?filename=playcss_border-collapse

    • 猜你在找的HTML相关文章