Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/73.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 有没有一种方法可以使用条件注释以Windows Mobile 7.5浏览器为目标?_Html_Internet Explorer_Windows Phone 7_Windows Mobile - Fatal编程技术网

Html 有没有一种方法可以使用条件注释以Windows Mobile 7.5浏览器为目标?

Html 有没有一种方法可以使用条件注释以Windows Mobile 7.5浏览器为目标?,html,internet-explorer,windows-phone-7,windows-mobile,Html,Internet Explorer,Windows Phone 7,Windows Mobile,我正试图将IE浏览器定位在WindowsMobile 7.5上。谁能告诉我 <!--[if lt IE <mobile browser>]> <include retina display> <[end if]--> <pre> <code> is this help for you by checking device width? <!-- [if (min-device-width: 481px)]>

我正试图将IE浏览器定位在WindowsMobile 7.5上。谁能告诉我

<!--[if lt IE <mobile browser>]> <include retina display> <[end if]--> 
<pre>
<code>
is this help for you by checking device width?
<!-- [if (min-device-width: 481px)]>

<![endif]—>
</code>
</pre>

条件注释语法样式是否适用于Windows Mobile


编辑:感谢下面的评论,我找到了一个解决方案
语法适用于Windows mobile 7,但我无法使其适用于Windows mobile 7.5。因为我正在构建一个移动网站,它不需要在桌面设备上很好地呈现,所以我能够使用一个通用的
,这可能适合您

<!--[if IEMobile]>
...
<![endif]-->



检查设备宽度对您有帮助吗?

以防有人遇到这个问题。有几点值得了解:

IE Mobile 7.5报告字体为假阳性。因此,您将该功能与Modernizer相结合是不走运的

为了混淆问题,它还忽略了上面建议的IE Mobile的条件注释。它实际上为IE9收集了条件注释。我能够修复的唯一方法是添加如下条件注释:



然后用
.ieMobile75
类作为相关样式的前缀。如果你想避免这些风格影响桌面IE,我建议将它们合并到媒体查询中。

谢谢你的回复。这适用于Windows mobile 7,但显然不适用于Windows mobile 7.5。我已经更新了上面的问题。这为我指明了正确的方向,并引导我找到了一个解决方案,谢谢。那么,Windows Phone 7.5的解决方案是什么(除了针对所有IE的空白)<代码>甚至不会触发

<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]>    <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]>    <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if IE 9]>    <html class="no-js ie9 ieMobile75" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->