【问题标题】:add css border to empty html <td></td> [duplicate]将css边框添加到空html <td></td> [重复]
【发布时间】:2013-11-06 03:44:09
【问题描述】:

可能重复:
CSS to make an empty cell's border appear?

我使用 css 为标签添加边框。问题是如果标签为空 ex &lt;td&gt;&lt;/td&gt;,则不会创建边框。

一种解决方法是使用空格&amp;nbsp;,但这需要编写一个脚本来检查数据是否为空。

有没有更好的方法来使用 CSS 以便显示边框?

【问题讨论】:

    标签: html css


    【解决方案1】:

    试试:

    table { empty-cells:show; }
    

    【讨论】:

      猜你喜欢
      • 2014-04-29
      • 2013-10-11
      • 1970-01-01
      • 2012-05-07
      • 1970-01-01
      • 2013-11-17
      • 2019-10-03
      • 2012-07-16
      • 1970-01-01
      相关资源
      最近更新 更多