我正在尝试通过rails发送HTML电子邮件,但它一直在Outlook上显示Times New Roman Linux on Linux正确呈现,Windows上的Gmail也正确呈现 当我在Outlook上收到时,它会显示一个按钮“在浏览器上显示此电子邮件”或类似的内容,并在那里显示正确 我试图在一个特定的元素中添加一个font-family标签,但它似乎并不重要
这是在Gmail上呈现的HTML代码
<div style="line-height:20px;color:#333333;font-size:12px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;margin:0">
<table cellpadding="20">
<tbody><tr>
<td>
<img alt="Logo" src="http://www.simplificpavarini.com.br/assets/logo.png">
</td>
</tr>
<tr>
<td>
<h3 style="color:#b0232a;margin-bottom:20px">Cotas Diárias - 26/07/2013</h3>
<table style="width:800px;line-height:20px;margin-bottom:20px;border-bottom:1px solid #dddddd">
<thead><tr style="background-color:#ddd">
<th style="width:70px;padding:6px;text-align:left;width:160px">Fundos</th>
<th style="width:70px;text-align:center;padding:6px;width:120px">Cota</th>
<th style="width:70px;text-align:center;padding:6px">Dia</th>
<th style="width:70px;text-align:center;padding:6px">Mês</th>
<th style="width:70px;text-align:center;padding:6px">Ano</th>
<th style="width:70px;text-align:center;padding:6px">12m </th>
<th style="width:70px;text-align:center;padding:6px">PL*</th>
<th style="width:70px;text-align:center;padding:6px">PL 12m*</th>
</tr></thead>
<tbody>
<tr>
<td style="width:70px;padding:6px;text-align:left">AAA ALLOCATION FIC FIM</td>
<td style="width:70px;padding:6px;text-align:left">
22,89476146
</td>
<td style="width:70px;text-align:center;padding:6px">0,10%</td>
<td style="width:70px;text-align:center;padding:6px">0,22%</td>
<td style="width:70px;text-align:center;padding:6px">2,90%</td>
<td style="width:70px;text-align:center;padding:6px">7,55%</td>
<td style="width:70px;text-align:center;padding:6px">45.526</td>
<td style="width:70px;text-align:center;padding:6px">45.649</td>
</tr>
<tr style="background-color:#f9f9f9">
<td style="width:70px;padding:6px;text-align:left">% CDI</td>
<td style="width:70px;text-align:center;padding:6px"></td>
<td style="width:70px;text-align:center;padding:6px">322%</td>
<td style="width:70px;text-align:center;padding:6px">55%</td>
<td style="width:70px;text-align:center;padding:6px">76%</td>
<td style="width:70px;text-align:center;padding:6px">109%</td>
<td style="width:70px;text-align:center;padding:6px"></td>
<td style="width:70px;text-align:center;padding:6px"></td>
</tr>
<tr>
<td style="width:70px;padding:6px;text-align:left">AAA SELECTION FIC FIM</td>
<td style="width:70px;padding:6px;text-align:left">
2,39205680
</td>
<td style="width:70px;text-align:center;padding:6px">-0,04%</td>
<td style="width:70px;text-align:center;padding:6px">0,15%</td>
<td style="width:70px;text-align:center;padding:6px">2,75%</td>
<td style="width:70px;text-align:center;padding:6px">5,93%</td>
<td style="width:70px;text-align:center;padding:6px">3.083</td>
<td style="width:70px;text-align:center;padding:6px">3.926</td>
</tr>
<tr style="background-color:#f9f9f9">
<td style="width:70px;padding:6px;text-align:left">% CDI</td>
<td style="width:70px;text-align:center;padding:6px"></td>
<td style="width:70px;text-align:center;padding:6px">-</td>
<td style="width:70px;text-align:center;padding:6px">37%</td>
<td style="width:70px;text-align:center;padding:6px">72%</td>
<td style="width:70px;text-align:center;padding:6px">86%</td>
<td style="width:70px;text-align:center;padding:6px"></td>
<td style="width:70px;text-align:center;padding:6px"></td>
</tr>
<tr>
<td style="width:70px;padding:6px;text-align:left">AAA AÇÕES FIC FIA</td>
<td style="width:70px;padding:6px;text-align:left">
12.285,04135694
</td>
<td style="width:70px;text-align:center;padding:6px">0,72%</td>
<td style="width:70px;text-align:center;padding:6px">-1,42%</td>
<td style="width:70px;text-align:center;padding:6px">-5,49%</td>
<td style="width:70px;text-align:center;padding:6px">3,08%</td>
<td style="width:70px;text-align:center;padding:6px">20.227</td>
<td style="width:70px;text-align:center;padding:6px">20.245</td>
</tr>
<tr style="background-color:#f9f9f9">
<td style="width:70px;padding:6px;text-align:left">Vs. Ibovespa</td>
<td style="width:70px;text-align:center;padding:6px"></td>
<td style="width:70px;text-align:center;padding:6px">-0.87%</td>
<td style="width:70px;text-align:center;padding:6px">-0.18%</td>
<td style="width:70px;text-align:center;padding:6px">17.61%</td>
<td style="width:70px;text-align:center;padding:6px">19.53%</td>
<td style="width:70px;text-align:center;padding:6px"></td>
<td style="width:70px;text-align:center;padding:6px"></td>
</tr>
</tbody>
</table>
<table style="width:800px;line-height:20px;margin-bottom:20px;border-bottom:1px solid #dddddd">
<thead><tr style="background-color:#ddd">
<th style="width:70px;padding:6px;text-align:left;width:160px">Índices</th>
<th style="width:70px;text-align:center;padding:6px;width:120px"></th>
<th style="width:70px;text-align:center;padding:6px">Dia</th>
<th style="width:70px;text-align:center;padding:6px">Mês</th>
<th style="width:70px;text-align:center;padding:6px">Ano</th>
<th style="width:70px;text-align:center;padding:6px">12m</th>
<th style="width:70px;text-align:center;padding:6px"></th>
<th style="width:70px;text-align:center;padding:6px"></th>
</tr></thead>
<tbody>
<tr>
<td style="width:70px;padding:6px;text-align:left">CDI</td>
<td style="width:70px;text-align:center;padding:6px"></td>
<td style="width:70px;text-align:center;padding:6px">0,03%</td>
<td style="width:70px;text-align:center;padding:6px">0,12%</td>
<td style="width:70px;text-align:center;padding:6px">3,55%</td>
<td style="width:70px;text-align:center;padding:6px">6,60%</td>
<td style="width:70px;text-align:center;padding:6px"></td>
<td style="width:70px;text-align:center;padding:6px"></td>
</tr>
<tr>
<td style="width:70px;padding:6px;text-align:left">Ibovespa</td>
<td style="width:70px;text-align:center;padding:6px"></td>
<td style="width:70px;text-align:center;padding:6px">1,60%</td>
<td style="width:70px;text-align:center;padding:6px">-3,57%</td>
<td style="width:70px;text-align:center;padding:6px">-24,92%</td>
<td style="width:70px;text-align:center;padding:6px">-18,42%</td>
<td style="width:70px;text-align:center;padding:6px"></td>
<td style="width:70px;text-align:center;padding:6px"></td>
</tr>
</tbody>
</table>
<div style="margin-top:20px;text-align:justify;font-size:10px">
* R$ Milhões
</div>
<div style="margin-top:20px;text-align:justify;font-size:10px">
<p style="margin:0 0 32px;margin-bottom:16px">
</td>
</tr>
</tbody></table>
</div>
答案 0 :(得分:1)
我知道了! 我需要为表中的每个td定义font-size和font-family 所以我做了
* {
font-family: ...
font-size: ...
}