gpt4 book ai didi

html - 需要 css 以允许用户将摘要中的单个帖子标记为已读

转载 作者:太空宇宙 更新时间:2023-11-04 02:02:19 25 4
gpt4 key购买 nike

我将 20 篇左右的帖子的 HTML 摘要通过电子邮件发送到我的列表。列表成员要求能够在摘要中将单个帖子标记为已读。我想出了一个很好的方法来做到这一点,它在本地工作(使用 Chrome 读取我生成的本地 .HTM 文件)但在我测试过的 4 个电子邮件客户端中的任何一个上都不起作用。

想法是在每个帖子旁边包含一个白色的、因此不可见的复选标记。然后我创建一个链接“将此帖子标记为已读”,该链接转到帖子中某处的 achor 标签。然后这使得“站点”的状态为“已访问”并且我的 a:visited 规则指定了可见颜色(与未访问链接的颜色相同)并且我使用 !important 覆盖“白色”颜色。因此,只有在点击后才会看到复选标记:将此帖子标记为已读。

整个事情是这样的:

In <style>:
a { color: #2020b7; }
a:visited { color: #2020b7 !important }

In <body>:
<a name="post-1"></a>
<a href="#post-1" style="color: #ffffff;">&#10004;</a> <== check mark
<a href="#post-1">Mark this post as read</a>

这是重建的,在这里输入,所以可能有错别字。它在本地运行良好。但是 Outlook 2010、Eudora 7、Gmail 或 Yahoo mail 似乎都不接受 anchor 链接或根本不使用此代码。

最佳答案

这是个好主意!

最终,我们将被电子邮件客户端缺乏对 :visited 的支持所束缚。链接状态, 这可以解释为什么您在某些电子邮件客户端中看不到这项工作。

enter image description here source


CSS <style> :

a:visited,
a:visited .checkmark {
color: #2020b7 !important;
}

HTML <body> :

<a name="post-1" style="color: #2020b7;">
<span style="color: #ffffff;" class="checkmark">&#10004;</a> /* check mark */
Mark this post as read
</a>

另一种方法是隐藏复选框

CSS <style> :

a:visited .checkmark {
display:inline !important;
font-size:10px !important;
color:#2020b7 !important;
line-height:10px !important;
max-height:auto !important;
max-width:auto !important;
opacity:1 !important;
overflow:visible !important;
mso-hide:none !important;
}

HTML <body> :

<a name="post-1" style="color: #2020b7;">
<span style="display:none;font-size:1px;color:#{color};line-height:1px;font-family:{font};max-height:0px;max-width:0px;opacity:0;overflow:hidden;mso-hide:all; class="checkmark">&#10004;</a> /* check mark */
Mark this post as read
</a>

但是这个例子还依赖于对 :visited 的支持链接状态。

关于html - 需要 css 以允许用户将摘要中的单个帖子标记为已读,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41537303/

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