在 Outlook Windows 桌面应用程序中,不支持复选框,因为它使用 MS Word 作为其渲染引擎。但是,在网络应用程序中,复选框可以工作并且我可以通过电子邮件发送网站吗 https://www.caniemail.com/search/?s=checked明确表示 Outlook.com(即 Outlook Web)支持 checkbox:checked。
我想默认隐藏数据,当复选框为 ":checked" 时,我想显示数据。但是,在邮件中,我可以单击复选框,但无法显示隐藏数据。有没有其他方法可以在 Outlook Web 中显示和隐藏数据?
这是我写的小提琴:https://jsfiddle.net/cL2dbpq5/ https://jsfiddle.net/cL2dbpq5/
这是它在 Outlook Web 中的外观:
code :
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/xhtml">
<head>
<style>
#content {
display: none;
}
#show:checked~#content {
display: block;
}
</style>
</head>
<body>
<input id="show" type=checkbox>
<label for="show">Click Me</label>
<span id="content">Text visible when checkbox is clicked</span>
</body>
</html>
就像声明的那样关于我可以发电子邮件吗 https://www.caniemail.com/features/css-pseudo-class-checked/#checked-cite-note-1, :checked
is “仅在类型选择器上受支持。” 在 Outlook.com 上。这意味着您可以使用input:checked
但不是#show:checked
。因此,在您的情况下,将您的样式替换为以下内容,它应该可以工作。
input:checked~#content {
display: block;
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)