ie10样式表 [英] ie10 stylesheet

查看:117
本文介绍了ie10样式表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图链接到IE10与外部样式表,但它不能正常工作。
发生了什么是IE10正在使用与其他浏览器相同的样式表。
我为IE 9和8附加了不同的样式表,那些都很好。
i甚至尝试为其他浏览器提供一个样式表,但IE 10似乎认为其中一个浏览器。

 <! -  [if lt IE 10]> 
< link rel =stylesheettype =text / csshref =ie10.css/>
<![endif] - >

[if gt IE 9] for'greather than' 9



此处解释: http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx



但是你应该仔细阅读网络( http:/ /www.sitepoint.com/microsoft-drop-ie10-conditional-comments/ )... ie10删除条件评论



相同主题在这里如何在特定情况下(例如Internet Explorer特定的CSS或Internet Explorer特定的JavaScript代码)仅定位Internet Explorer 10?



a href =http://blogs.msdn.com/b/ie/archive/2011/07/06/html5-parsing-in-ie10.aspx?Redirected=true =nofollow noreferrer>不再支持条件注释



并回答:链接到IE10 - >



可以尝试一些 jQuery 这样(nota:此属性在jQuery 1.9中删除,只能通过jQuery.migrate插件。):

  if($ .browser.msie&& $ .browser.version == 10){
$(html)。addClass(ie10);
}

或者您可以尝试 @media -ms-high-contrast Hack



  @media屏幕和(-ms-high-contrast:active) - 高对比度:无){
/ * IE10特定样式在这里* /
}


b $ b

,或者您可以试试 @media Zero Hack

  @media (min-width:0 \0){
/ * IE9和IE10规则集到这里* /
}


I'm trying to link to IE10 with an external style sheet but its not working properly. whats happening is IE10 is using the same style sheet as the other browsers. i have attached different stylesheets for IE 9 and 8 and those are fine. i even tried to have a style sheet for the other browsers but IE 10 seems to think its one of the other browsers.

<!--[if lt IE 10]>
<link rel="stylesheet" type="text/css" href="ie10.css" />
<![endif]-->

解决方案

[if gt IE 9] for 'greather than' 9

explained here : http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx

BUT you should read carefully over the net ( http://www.sitepoint.com/microsoft-drop-ie10-conditional-comments/) ... ie10 dropped conditional comments.

Same topic here How do I target only Internet Explorer 10 for certain situations like Internet Explorer-specific CSS or Internet Explorer-specific JavaScript code?

no more support for conditional comments

And to answer to : link to IE10 -->

Perhaps you can try some jQuery like this (nota: This property was removed in jQuery 1.9 and is available only through the jQuery.migrate plugin.):

if ($.browser.msie && $.browser.version == 10) {
  $("html").addClass("ie10");
}

Or you can try the @media -ms-high-contrast Hack like this:

@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {  
   /* IE10-specific styles go here */  
}

or you can try the @media Zero Hack

@media screen and (min-width:0\0) {  
    /* IE9 and IE10 rule sets go here */  
}

这篇关于ie10样式表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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