问题
条件注释,例如
<!--[if IEMobile]>
<p>Welcome to Internet Explorer Mobile.</p>
<![endif]-->
<![if !IEMobile]>
<p>All other browsers</p>
<![endif]>
在Windows Phone 7上不起作用!或者至少在我的手机上不起作用。
问题
有人知道如何使用这些注释吗?并且之前测试过吗?IE 9在WP7上是否支持这个?
条件注释,例如
<!--[if IEMobile]>
<p>Welcome to Internet Explorer Mobile.</p>
<![endif]-->
<![if !IEMobile]>
<p>All other browsers</p>
<![endif]>
在Windows Phone 7上不起作用!或者至少在我的手机上不起作用。
有人知道如何使用这些注释吗?并且之前测试过吗?IE 9在WP7上是否支持这个?
非常抱歉,以下内容在Mango之前可以使用。
<!--[if IEMobile 7]> <p>欢迎使用Internet Explorer Mobile。</p> <![endif]--> <![if !IEMobile 7]> <p>所有其他浏览器</p> <![endif]>
看起来现在必须使用JAvaScript并检查UserAgent以查看Windows Phone OS 7或Windows Phone OS 7.5是否已列出...唯一的方法。
尝试使用gte(以防它将您的手机视为7.5)
<!--[if gte IEMobile 7]>
<p>Welcome to Internet Explorer Mobile.</p>
<![endif]-->
<![if !IEMobile 7]>
<p>All other browsers</p>
<![endif]>