gitbook中,希望用markdown实现这种的表格:
即:表格中某些单元格是组合在一起的
此处表头的1,2列,3,4列分别组合(后居中对齐)
markdown table cell merge
github markdown colspan – Stack Overflow
只能内嵌html
Does the markdown table support colspan? – TestRail Discussion – Gurock Community & TestRail Forum
Tables in pure Markdown – Extensions – CommonMark Discussion
Advanced tables (colspan / rowspan / multi-paragraph)? · Issue #87 · gettalong/kramdown
how can I merge cells in a table?
【总结】
最后用内嵌html代码:
<table>
<tr>
<td colspan=”2″ >总部库存</td>
<td colspan=”2″ >经销商库存</td>
</tr>
<tr>
<td>(在产线上)生产中</td>
<td>已下线(到总部的库存中)</td>
<td>(用大卡车从总部)在途中(运往经销商4S店)</td>
<td>已到店(进去4S店的库存)</td>
</tr>
</table>
效果:
然后再去设置对齐和表头的背景色:
<td colspan=”2″ align=”center” style=”background-color:#2674BA; color:white; font-weight:700;”>总部库存</td>
<td colspan=”2″ align=”center” style=”background-color:#2674BA; color:white; font-weight:700;”>经销商库存</td>
效果: