有没有一种方法可以使用条件注释来定位Windows Mobile 7.5浏览器? [英] Is there a way to target Windows Mobile 7.5 browser using conditional comments?
问题描述
我正在尝试针对Windows Mobile 7.5上的IE浏览器.谁能告诉我
I'm trying to target the IE browser on Windows Mobile 7.5. Can anyone tell me if the
<!--[if lt IE <mobile browser>]> <include retina display> <[end if]-->
条件注释语法样式可用于定位Windows Mobile吗?
conditional comment syntax style works for targeting Windows Mobile?
由于下面的评论,我得以找到解决方案. The <!--[if IEMobile]> <[end if]-->
语法适用于Windows Mobile 7,但我无法使其适用于Windows Mobile 7.5.因为我建立的移动网站不需要在桌面设备上很好地呈现,所以我能够使用通用的<!--[if gt IE 7]>
注释来解决我在两个渲染之间遇到的问题.
Thanks to the comment below I was able to find a solution. The <!--[if IEMobile]> <[end if]-->
syntax works for Windows mobile 7, but I couldn't get it to work for Windows mobile 7.5. Because I am building a mobile website that isn't required to present well on desktop devices I was able to use a generic <!--[if gt IE 7]>
comment that gets around the issue I was having between the two renderings.
如果有人因为需要桌面支持而无法使用它时,有一个更优雅的解决方案,我很想听听.
If anyone out there has a more elegant solution for when this won't work because of required desktop support, I'd love to hear it.
推荐答案
可能是适合您的工作
<!--[if IEMobile]>
...
<![endif]-->
这篇关于有没有一种方法可以使用条件注释来定位Windows Mobile 7.5浏览器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!