---
title: "可同时区分IE8、IE7、IE6、Firefox3、Firefox2的CSS hacks"
author: "karrykai"
date: "2009-08-10T10:47:28Z"
tags: []
slug: "ie8-ie7-ie6-firefox3-firefox2-css-hacks"
draft: false
lastmod: "2009-08-10T10:47:28Z"
id: 474383
url: "https://karrykai.iteye.com/blog/474383"
---

可同时区分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; /* IE8 only \*/  
    color:#00f\\9; /* 适用于所有IE版本 \*/  
}

Copyright [playgoogle.com](http://www.playgoogle.com)© 2008

[继续阅读《可同时区分IE8、IE7、IE6、Firefox3、Firefox2的CSS hacks》的全文内容...](http://www.playgoogle.com/post/97.html)

### 相关文章:

- [三栏布局，左右固定宽度，中间自适应的一种解决方案](http://www.playgoogle.com/post/98.html)  (2009-8-18 13:42:28)
  
  [让IE6瞬间崩溃的5种方式](http://www.playgoogle.com/post/89.html)  (2009-6-22 10:39:33)
  
  [【收藏】CSS技巧教程资源大全](http://www.playgoogle.com/post/86.html)  (2009-6-17 13:29:55)
  
  [【收藏】字体、排版简明入门](http://www.playgoogle.com/post/72.html)  (2009-4-1 10:58:52)
  
  [WebKit私有属性介绍](http://www.playgoogle.com/post/61.html)  (2009-3-13 21:32:5)

![](http://www1.feedsky.com/t1/271665526/PlayGoogleKarry/feedsky/s.gif?r=http%3A%2F%2Fwww.playgoogle.com%2Fpost%2F97.html)

[![](http://www1.feedsky.com/r/i/feedsky/PlayGoogleKarry/271665526/art01.gif)](http://www1.feedsky.com/r/l/feedsky/PlayGoogleKarry/271665526/art01.html)