【发布时间】:2016-10-23 21:09:50
【问题描述】:
我正在为一个项目工作,我需要将 photoshop 生成的 html 转换为电子邮件客户端兼容。
收到 psd 文件后,我需要创建切片然后生成 html。问题是生成的 html 有带有行跨度和列跨度的表。然后我手动删除这些 colspans 和 rowspans 并嵌套表以实现相同的布局。
我的问题是,我可以使用库或其他东西来自动执行此任务吗?
下面只是一个例子,真正的问题可以包括任何特定顺序的各种 colspans 和 rowspans。
示例 -
PS代码->
<tr>
<td colspan="3">First row 3 columns</td>
</tr>
<tr>
<td>Second row first column</td>
<td>Second row second column</td>
<td>Second row column column</td>
</tr>
然后我必须将其编码为 -
<tr>
<td>First row 3 columns</td>
</tr>
<tr>
<td>
<table>
<tr>
<td>Second row first column</td>
<td>Second row second column</td>
<td>Second row column column</td>
</tr>
</table>
</td>
</tr>
【问题讨论】:
标签: html-table html-email psd html-generation