php - 通过电子邮件询问评级

标签 php html css email html-email

在我的应用程序中,我们将通过向用户发送电子邮件来获得用户的反馈。因此,如果用户填写字段并提交,那么我会将其存储在我的数据库中。

我准备了一个 html 邮件,看起来像这样。

This what i am getting in email

但这里的问题是我无法在邮件中显示评级星级。这需要内联 css,但我无法将该 css 放入内联,因为它包括悬停 css。

那么有什么方法可以通过电子邮件发送评分。

onhover 内联的 css 有什么办法吗 提前谢谢你。

最佳答案

尝试在您的悬停 CSS 中使用 !important 来控制您的内联 CSS。

然而,从大局考虑 - html 电子邮件不完全支持表单,因此根据您的列表,您可能有 20% 以上的人无法使用它们。 (表格支持图表 herehere )

考虑到这一点,为了获得 100% 的支持,大多数电子邮件营销人员会将他们发送到承载表单的登录页面。另一种选择是使用简单的 href 标签和 URL 参数来捕获基本信息。像这样:

<!-- use star images that pass a custom url with user info -->
<a href="http://www.yoursite.com?name=your.subscriber@gmail.com&rating=1"><img alt="1" src="" width="40" height="40" style="margin: 0; border: 0; padding: 0;"></a>
<a href="http://www.yoursite.com?name=your.subscriber@gmail.com&rating=2"><img alt="2" src="" width="40" height="40" style="margin: 0; border: 0; padding: 0;"></a>
<a href="http://www.yoursite.com?name=your.subscriber@gmail.com&rating=3"><img alt="3" src="" width="40" height="40" style="margin: 0; border: 0; padding: 0;"></a>
<a href="http://www.yoursite.com?name=your.subscriber@gmail.com&rating=4"><img alt="4" src="" width="40" height="40" style="margin: 0; border: 0; padding: 0;"></a>
<a href="http://www.yoursite.com?name=your.subscriber@gmail.com&rating=5"><img alt="5" src="" width="40" height="40" style="margin: 0; border: 0; padding: 0;"></a>

关于php - 通过电子邮件询问评级,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19900691/

相关文章:

php - 无法获取选择项目的值?

php - 使用 memcached 存储桶掌握 Couchbase

html - 更改我的标签左侧 bootstrap3 标签的颜色

html - top 50% 不适用于 padding-bottom 设置高度的元素

css - 将页脚 DIV 和页眉 DIV 添加到我当前的 CSS Flexbox 布局

javascript - 动态添加的输入框不是动态绑定(bind)的

php - 使用 PHP 检查上传文件的 mime 类型。 mime_content_type、fileINfo、linux 文件不可用

css - iPad 特定的 CSS Div 问题

css - 如何在 Material Design Lite 中使用自定义颜色?

javascript - 使用 Javascript 在 Ajax 响应中查找元素