我正在尝试为电子邮件编写代码,这就是我使用表格和内联样式的原因。
我想删除 span
和 p
之间的空格。我不知道为什么它首先出现在那里。
<tr>
<td>
<span valign="top" bgcolor="#fff" class="content" style=" font-family: 'Lato',Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-weight:700; font-size: 19px; line-height:35px; color: #654308;> Header Goes Here </span>
<p font-family: 'Lato',Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-weight:200; font-size: 16px; color: #654308;>Lorem ipsum dolor sit amet consectetur incididunt ut labore et dolore magna aliqua elit sed do eiusmod. </p>
</td>
</tr>
最佳答案
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<table>
<tr>
<td>
<span valign="top" bgcolor="#fff" class="content" style=" font-family: 'Lato',Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-weight:700; font-size: 19px; line-height:35px; color: #654308;"> Header Goes Here </span>
<p style="margin:0px; font-family: 'Lato',Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-weight:200; font-size: 16px; color: #654308;">Lorem ipsum dolor sit amet consectetur incididunt ut labore et dolore magna aliqua elit sed do eiusmod. </p>
</td>
</tr>
</table>
</body>
</html>
关于html - 删除电子邮件中跨度和段落之间的空格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39253226/