Outlook 2007到2013显示设备介质查询 [英] Outlook 2007 to 2013 Displaying Device Media Queries

查看:86
本文介绍了Outlook 2007到2013显示设备介质查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了自定义电子邮件模板,使用媒体查询来定位小于480像素的设备。该电子邮件在每个电子邮件客户端和平台 - Gmail,Yahoo !, Hotmail,Apple Mail,Thunderbird,Outlook 2003等中显示完美 - 除了Outlook 2007到2013之外。

I developed a custom email template that uses a media query to target devices smaller than 480px. The email looks and displays perfect in every email client and platform - Gmail, Yahoo!, Hotmail, Apple Mail, Thunderbird, Outlook 2003, etc - with the exception of Outlook 2007 to 2013.

Outlook 2007到2013会挑出媒体查询,并使用给定的CSS声明样式化电子邮件。当我删除媒体查询,它完美呈现。任何想法我如何可以让Outlook忽略媒体查询?

Outlook 2007 to 2013 oddly picks up the media query and styles the email with the given css declarations. When I remove the media query, it renders perfectly. Any idea how I can have Outlook ignore the media query?

下面是正在使用的媒体查询以及一个jsFiddle链接。将最大设备宽度更改为最大宽度,以查看正在操作的媒体查询。

Below is the media query being used as well as a jsFiddle link. Change max-device-width to max-width to see the media query in action.

jsFiddle: http://jsfiddle.net/danimalnelson/uQ7kg/

jsFiddle: http://jsfiddle.net/danimalnelson/uQ7kg/

@media only screen and (max-device-width: 480px) {


推荐答案

您可以强制Microsoft忽略部分代码:

You can force Microsoft to ignore parts of the code with:

<!--[!if gte mso 9]><!-->
 // This will be ignored by Outlook 2007
<![endif]-->

<!--[!if gte mso 15]><!-->
 // This will be ignored by Outlook 2013
<![endif]-->

<!--[if !mso]><!-->
 // This will be ignored by all Microsoft Outlook
<!--<![endif]-->

这里是 Outlook版本号

这篇关于Outlook 2007到2013显示设备介质查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆