css 判断浏览器类型2009-09-16 18:20<html>
<head>
<title>关于用CSS区分Firefox、IE6、IE7</title>
<style. type="text/css">
#example{color:red ;}/*firefox*/
* html #example{color:blue;}/*ie6*/
*+html #example{color:green;}/*ie7*/
</style>
</head>中国经济网 经济博客 M$Q f A E1Z
<body>
<div id="example">在FireFox下应为红色,在IE6.0下应为蓝色,在IE7.0下应为绿色。</div>
</body>中国经济网 经济博客4B t C ?(A l S
</html>
<head>
<title>关于用CSS区分Firefox、IE6、IE7</title>
<style. type="text/css">
#example{color:red ;}/*firefox*/
* html #example{color:blue;}/*ie6*/
*+html #example{color:green;}/*ie7*/
</style>
</head>中国经济网 经济博客 M$Q f A E1Z
<body>
<div id="example">在FireFox下应为红色,在IE6.0下应为蓝色,在IE7.0下应为绿色。</div>
</body>中国经济网 经济博客4B t C ?(A l S
</html>