排除使用CSS类的单个浏览器 [英] Exclude single browser from using a CSS class

查看:127
本文介绍了排除使用CSS类的单个浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想排除使用特定CSS类的Internet Explorer。
这可能吗?



详细信息:

我有一个类似于 -

  input [type =radio]:checked,input [type =radio]:hover 
{
box-shadow:0px 0px 10px#90BBD4;





$ b

由于Firefox的最新浏览器更新删除了-moz-box-shadow属性,而我相信它现在使用默认的盒子阴影来代替......我的Firefox仍然工作得很好,但Internet Explorer现在可以识别它并且弄乱了外观。

我可以怎样将IE从这个课程中排除或以某种方式解决它?

解决方案

这将设置客户端浏览器正在使用的IE版本的类。

 <! -  [if lt IE 7]> < html class =ie6lang =enxml:lang =en>百分比抑制率ENDIF]  -  GT!; 
<! - [if IE 7]> < html class =ie7lang =enxml:lang =en>百分比抑制率ENDIF] - GT!;
<! - [if IE 8]> < html class =ie8lang =enxml:lang =en>百分比抑制率ENDIF] - GT!;
<! - [if IE 9]> < html class =ie9lang =enxml:lang =en>百分比抑制率ENDIF] - GT!;
<! - [if(gt IE 9)|!(IE)]><! - >< html class =lang =en> <! - <![ENDIF] - GT;

然后使用CSS,您可以使用类似于以下内容的方式将其定位到特定浏览器:

  .ie7 #wrapper 
{
display:none;
}


I'd like to exclude Internet Explorer from using a specific CSS class. Is this possible?

Details:

I have a css class that looks like -

input[type="radio"]:checked, input[type="radio"]:hover
{
   box-shadow: 0px 0px 10px #90BBD4;
}

Since Firefox's latest browser update removed the -moz-box-shadow property and I believe it now uses the default box-shadow instead, ... my Firefox is still working great, but Internet explorer now recognizes it and messes up the look.

How might I go about excluding IE from using this class or work around it somehow?

解决方案

This will set a class of the IE version the client browser is using.

<!--[if lt IE 7 ]> <html class="ie6" lang="en" xml:lang="en"> <![endif]-->
<!--[if IE 7 ]>    <html class="ie7" lang="en" xml:lang="en"> <![endif]-->
<!--[if IE 8 ]>    <html class="ie8" lang="en" xml:lang="en"> <![endif]-->
<!--[if IE 9 ]>    <html class="ie9" lang="en" xml:lang="en"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><html class="" lang="en"> <!--<![endif]-->

Then using CSS you can target it to a specfic browser by using something like:

.ie7 #wrapper
  {
     display:none;
  }

这篇关于排除使用CSS类的单个浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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