【问题标题】:nested table border-bottom not displaying嵌套表格边框底部不显示
【发布时间】:2021-11-26 02:34:12
【问题描述】:

我有一个角度嵌套的表格 (class="inner-table"),但是在使用边框底部到 tr 时它不显示

<table>
   <td>
       <table class="inner-table">
          <tr>row1</tr>
          <tr>row2</tr>
       </table>
   </td>
</table>


CSS
.inner-table tr{
    text-overflow: ellipsis; 
    overflow: hidden; 
    white-space: nowrap;
    line-height: 2;
    border-bottom: 1px solid black;    
}

【问题讨论】:

  • 你能把你的css也包括在这里吗?
  • @SarahCox 刚刚添加,对此感到抱歉

标签: css angular html-table mat-table


【解决方案1】:

tr 边框仅在折叠边框模式下被遵守。请参阅下面内表中的内联样式属性。

.inner-table tr{
    text-overflow: ellipsis; 
    overflow: hidden; 
    white-space: nowrap;
    line-height: 2;
    border-bottom: 1px solid black;    
}
<table>
   <td>
       <table class="inner-table" style="border-collapse: collapse">
          <tr><td>row1</td></tr>
          <tr><td>row2</td></tr>
       </table>
   </td>
</table>

【讨论】:

    猜你喜欢
    • 2020-05-24
    • 1970-01-01
    • 2019-06-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-08-25
    • 2015-09-11
    • 2011-11-02
    相关资源
    最近更新 更多