1

是否可以在 HTML 电子邮件中检查设备是否为 iOS?

我想显示 Apple 和 Google 映射到本机应用程序的架构链接,但前提是设备支持它。

4

2 回答 2

2

在网上看了一下,甚至找不到 CSS 中的 hack。耻辱没有等同于<!--[if gte mso 9]>标签。看起来答案在技术上是否定的......

在这种情况下,好消息是 Mac 对其他客户端有不同的 CSS 支持,因此您可以利用它作为电子邮件中的解决方法。

尝试使用其中一个 CSS 选择器(例如 Nth child)。这些是只有 mac 识别的 CSS 属性

从理论上讲,您可以默认隐藏某些内容并将第 N 个子选择器设置为仅显示 Mac 内容。

如果您真的很绝望,您还可以在相同颜色的背景上使用 RGBA 或 HSLA 颜色显示一些“仅限 m​​ac”文本(使其不可见)。

于 2013-05-28T19:36:23.740 回答
0

Consider using the same link in the email, like example.com/emailLink, where that endpoint on your server is server-side code (like PHP) detecting the browser and then delivering the link you'd like.

http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/

于 2013-06-08T19:40:58.133 回答