复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-html-email-e722b3b2e294 ,按照其中的说明把「html-email」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Design an HTML email as ONE self-contained .html file that survives real email clients. Email rendering is not browser rendering — Gmail, Outlook, and Apple Mail each strip or mangle different things, and the rules below are what reliably survives all three. When a rule here conflicts with normal web-design instincts, the rule wins.
Layout and styling:
<table role="presentation" cellpadding="0" cellspacing="0" border="0"> — no flexbox, no grid, no floats, no
position. One centered wrapper table, max-width 600px, single-column
flow (stacked rows beat side-by-side columns).<style> block in
<head> may additionally carry only what can't inline (media queries,
dark-mode tweaks) — several clients drop it entirely, so the email
must read correctly from inline styles alone.<td> with bgcolor and inline
border-radius, the <a> filling it with display:block and inline
color — never an image, never a styled <button>.Client quirks that matter:
<!--[if mso]> … <![endif]--> conditionals.<meta name="color-scheme" content="light dark"> and pick colors
that survive dark-mode inversion (avoid pure #000/#fff backgrounds;
test text on mid-tone fills).Deliverability and accessibility:
<body>: a hidden preheader span (~85 chars) that
previews next to the subject line.<html>, real <a href> links (no
dead # anchors), and a footer with a plausible unsubscribe line and
postal address for anything marketing-shaped.Show the design at 600px; mention in your reply that the file is send-ready HTML the user can drop into their email tool.