首页 > 解决方案 > 在 html 邮件中使用 css 展开/折叠内容

问题描述

我正在构建 html 邮件,其中有一个复选框:

#table1 {display: block}
input:checked ~ #table1 {display: none}
<input id="checkbox" class="toggle" type="checkbox">
<table id="table1" style="width: 100%; border: 0; padding: 0; text-align: center; position: fixed; bottom: 0" cellpadding="9" cellspacing="0"> 
  <td style="font-size: 9px; font-family: Verdana; color:#898a8c">hide me</td>
</table>

如果我在我的网络浏览器中打开它,它可以正常工作,但是,如果我将它作为 html 电子邮件发送(我正在使用 Outlook),选中的复选框不会发生任何事情。我知道没有办法在邮件中使用 JavaScript(这将是一个安全问题),但是,我可以让它只使用 CSS 工作吗?

标签: htmlcssemail

解决方案


推荐阅读