gpt4 book ai didi

html - 电子邮件中没有像在 HTML 中那样显示粗复选标记

转载 作者:行者123 更新时间:2023-11-28 00:39:31 25 4
gpt4 key购买 nike

我原来是问这个的in this thread并得到了我对常规 HTML 的回答,但是以下代码在通过电子邮件发送时显示不一样:

<div style="color:white; text-shadow: -2px 0 black, 0 2px black, 2px 0 black, 0 -2px black; font-size: 30px;">&#10004;</div>
<div style="color:yellow; text-shadow: -2px 0 black, 0 2px black, 2px 0 black, 0 -2px black; font-size: 30px;">&#10004;</div>
<div style="color:green; text-shadow: -2px 0 black, 0 2px black, 2px 0 black, 0 -2px black; font-size: 30px;">&#10004;</div>

这是因为出现Microsoft sees it as an emoji .

我已经尝试了以下代码,但没有任何变化:

<div class="unicode" style="color:white; text-shadow: -2px 0 black, 0 2px black, 2px 0 black, 0 -2px black; font-size: 30px;">&#10004;</div>

我得到的只是默认值:

example image

这是我目前正在使用/调整的 jinja2 模板,试图让它工作(参见 tbody 部分):

jinja_tmplt = """<!DOCTYPE html>
<html lang=\"en-US\">
{% for html_CI in html_CI_list %}
{% set columns = html_CI.tech_DF.columns.values[1:] %}
<h1>{{ html_CI.tech_grp }}</h1><br/>
{{ html_CI.tech_DF.to_html(index=False) }}<br>
<style>.table tbody tr:nth-child(even) {background-color: #ABC233;} .table tbody tr:nth-child(odd) {background-color: #6CC04A;}</style>
<table border="1" class="dataframe table table-striped">
<thead>
<tr style="text-align: center;">
{% for col_hdr in columns %}
<th style="background-color: #005C21; text-align: center; color:white">{{ col_hdr }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for row in html_CI.tech_DF.itertuples() %}
<tr style="text-align: center;">
{% for elem_data in row[2:] %}
{% set loop_num = loop.index0 %}
{% if loop_num == 0 %}
<td>{{ elem_data }}</td>
{% else %}
<td><div style="color:white; text-shadow: -2px 0 black, 0 2px black, 2px 0 black, 0 -2px black; font-size: 30px;">&#10004;</div></td>
{% endif %}
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
{% endfor %}
</html>"""

请注意,表格着色样式也适用于 HTML,但不适用于电子邮件。

最佳答案

:before不适用于 Gmail、Outlook、Yahoo 或笔记。

以下复选标记适用于每个主要的电子邮件客户端。它们可以调整大小和颜色。它们的确切外观可能会因电子邮件客户端或用于显示它们的字体而有所不同:

  • &#x2713; - 复选标记
  • &#x2714; - 沉重的复选标记

样本着色:

<span style="color: #ff0000;">&#x2713; - Check Mark: red </span>

<span style="color: #0000ff;">&#x2714; - Heavy Check Mark: blue</span>

祝你好运。

关于html - 电子邮件中没有像在 HTML 中那样显示粗复选标记,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54317902/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com