【问题标题】:MVC - HTML Table only displays outer borderMVC - HTML 表格只显示外边框
【发布时间】:2018-02-04 07:08:51
【问题描述】:

我有一个 MVC 视图,其中包含一个表,该表使用一组 <thead><th></th></thead> 填充(从部分视图),然后是一组 <tr></tr>。在完整视图中,我的表格标记如下:

<table id="resultTable" border="1">

由于某种原因,动态填充的 &lt;tr&gt;s 和 &lt;td&gt;s 没有显示边框。

我已经做了一些搜索,但找不到原因。

以前有人处理过吗?

【问题讨论】:

    标签: html css model-view-controller html-table border


    【解决方案1】:

    添加一个css:

    #resultTable td {border: 1px solid #555;}
    

    顺便说一句...您添加的表格行应该在 tbody 标记内。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-09-11
      • 2011-11-02
      • 1970-01-01
      • 2016-06-04
      • 2015-07-06
      • 2013-06-20
      相关资源
      最近更新 更多