用Foundation编写HTML是如此重复



我承认,一般来说,我对编写代码不是很有经验——我是根据需要编写的。我们公司正在研究为电子邮件编写代码的不同框架。我们偶然发现了Zurb基金会。我想,太好了,这会让写作变得不那么复杂。然后,在浏览教程时,我看到了制作按钮的方法:

<table align="center" class="container">
<tbody>
<tr>
<td>
<table class="row">
<tbody>
<tr>
<th class="small-12 large-12 columns first last">
<table>
<tr>
<th>
<center data-parsed="">
<table class="button float-center">
<tr>
<td>
<table>
<tr>
<td><a href="#">Centered Button</a></td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</th>
<th class="expander"></th>
</tr>
</table>
</th>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>

为什么??为什么在编码时,所有内容都必须指向表中的表、表头、表行、表单元格、表行。它会一直持续下去,当我看到它的时候,我真的很生气。我不明白为什么制作一个简单的按钮不能是一行文字,就是这样

为什么对于最简单的事情来说,代码必须如此漫长和复杂?

Foundation电子邮件使用Inky-一种自定义模板语言(与所有其他电子邮件框架一样(,它为您生成此模板语言。

https://foundation.zurb.com/emails/docs/inky.html

电子邮件是另一种野兽,如果手工编写表格,这很常见。正如Daniel所指出的,Inky是避免这种混乱的方法。

最新更新