CSS条件判断语句格式可以这样写吗??不可以那又该怎样写??求强人帮忙看看

来源:百度知道 编辑:UC知道 时间:2024/05/28 10:51:11
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
<!--[if IE]>.imgClass {border: 0px solid #000;} <![endif]-->
<!--[if lte IE 6]><style>.top{color:#FF6666; text-decoration: none}</style><![endif]-->
<!--[if lte IE 6]><link rcl="stylesheet",type="text/css" href="xx.css"><![endif]-->
</style>
</head>
<body>
</body>
</html>

可以是可以,只能区别IE浏览器

我想你要写的效果是调整浏览器的区别的吧

这样写利用hack
firfox ie7 ie6
div{
width:100px;
*width:110px;
_width:120px;
}

可以分别设置firfox IE7 IE6的DIV宽度
其他样式同理