You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Power Automate自动化邮件在Outlook中CSS与图片显示异常求助

Outlook邮件渲染问题修复方案

一、内联CSS在Outlook中失效的修复

Outlook桌面版对CSS支持有限,多数内联样式需结合HTML原生属性才能生效,针对你的代码调整如下:

  • 表格行高度:将style="height: 70"替换为HTML属性height="70"(Outlook优先识别HTML属性而非style中的height)
  • 单元格背景色:在<td>标签中添加bgcolor="slategray",因为Outlook不支持style中的background-color
  • 字体样式:补充face="sans-serif"作为style的 fallback,确保字体在Outlook中正常显示

二、图片仅显示alt文本的修复

图片不显示核心原因及修复方法:

  1. 权限/链接问题:你使用的SharePoint图片链接可能需内部权限才能访问,Outlook无法直接加载。可选择:
    • 将图片上传至公开可访问的存储位置
    • 在Power Automate中把图片作为邮件附件嵌入,使用cid:协议引用(需在Power Automate中设置附件的Content ID)
  2. Outlook默认限制:Outlook默认阻止外部图片,需为<img>添加border="0"和display:block样式,同时确保width/height为HTML原生属性(而非仅在style中设置)

修改后的完整代码

<tr align="center" height="70">
    <td face="sans-serif" bgcolor="slategray" style="font-family: sans-serif; font-size: 24px; color: black;">
        <a href="https://app.powerbi.com" target="_blank">
            <img src="https://公开可访问的图片链接.png" alt="picture" width="400" height="200" border="0" style="display:block;">
        </a>
    </td>
</tr>

额外提示:若需更复杂的兼容样式,建议全程使用表格布局,针对背景等特殊效果可补充VML代码,同时避免使用CSS浮动、定位等高级属性。

内容的提问来源于stack exchange,提问作者ProgrammingEnthusiast

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.19 16:25:56