Home > 计算机技术 > Micolog > 网页前端 > 可同时区分IE8、IE7、IE6、Firefox3、Firefox2的CSS hacks

可同时区分IE8、IE7、IE6、Firefox3、Firefox2的CSS hacks

September 5th, 2009 发表评论 阅读评论

IE

可同时区分IE8、IE7、IE6、Firefox3、Firefox2的CSS hacks:

.test{
    
color:/*\**/#00f\9 ; /*IE8*/
}
.test,
.test:-moz-any-link{
    
color:#f60; /*Firefox2*/
}
.test,
.test:default{
    
color:#000; /*Firefox3*/
    
*color:#f00; /*IE7*/
    _
color:#0f0; /*IE6*/
}

可同时区分IE8、IE7、IE6、Firefox的CSS hacks:

.test{
    
color:#000; /*Firefox*/
    
color:/*\**/#00f\9; /*IE8*/
    
*color:#f00; /*IE7*/
    _
color:#0f0; /*IE6*/
}

关于IE8的hacks:

.test{
    
color:/*\**/#00f\9; /*IE8only*/
    
color:#00f\9; /* 适用于所有IE版本 */
}

转载请以超链接注明来自  云在天边看世界
本文永久链接  http://www.tangblog.info/2009/09/5/distinguish_explorer.html

分类: 计算机技术 , Micolog , 网页前端 标签: ,

  1. avatar
    xiaoxiao 2012-09-17 at 17:51 |#1

    The Anti-Japanese Parade on 15th,Sep in Changsha
Comment pages
  1. 本文目前尚无任何 trackbacks 和 pingbacks.
/static/smilies/icon_twisted.gif /static/smilies/icon_smile.gif /static/smilies/icon_cry.gif /static/smilies/icon_question.gif /static/smilies/icon_razz.gif /static/smilies/icon_mrgreen.gif /static/smilies/icon_sad.gif /static/smilies/icon_evil.gif /static/smilies/icon_exclaim.gif /static/smilies/icon_redface.gif /static/smilies/icon_biggrin.gif /static/smilies/icon_surprised.gif /static/smilies/icon_eek.gif /static/smilies/icon_confused.gif /static/smilies/icon_cool.gif /static/smilies/icon_lol.gif /static/smilies/icon_mad.gif /static/smilies/icon_rolleyes.gif /static/smilies/icon_wink.gif /static/smilies/icon_idea.gif /static/smilies/icon_arrow.gif /static/smilies/icon_neutral.gif
capacha 请输入验证码(不区分大小写)