<html>
<head>
<title>This is a test </title>
<style type="text/css">
div{
width:100px;
height:50px;
background-color:red;display:block;
}
div:hover{
background-color:yellow;
}
</style>
</head>
<body>
<div>
为什么
<div>
</body>
</html>
我的IE是IE7版本的,但是对于上述代码,当鼠标经过时,为什么div的背景颜色没有变化?为什么大家都说IE7中,div可以用:hover属性,而我的机器上不能正常显示了?还有,如何使用条件注释了?
<!--[if lte IE6]>
dfdfd
<![endif]-->
为什么这样的注释在IE7中直接显示在界面上了?
<head>
<title>This is a test </title>
<style type="text/css">
div{
width:100px;
height:50px;
background-color:red;display:block;
}
div:hover{
background-color:yellow;
}
</style>
</head>
<body>
<div>
为什么
<div>
</body>
</html>
我的IE是IE7版本的,但是对于上述代码,当鼠标经过时,为什么div的背景颜色没有变化?为什么大家都说IE7中,div可以用:hover属性,而我的机器上不能正常显示了?还有,如何使用条件注释了?
<!--[if lte IE6]>
dfdfd
<![endif]-->
为什么这样的注释在IE7中直接显示在界面上了?
为什么网上,书上都说IE7可以支持的,而我的是IE7不支持,到底IE7支持不?
我在我的IE7中就可以正确显示你的代码。
还有 条件注释<!--[if lte IE6]>
dfdfd
<!--[endif]-->
[code=INIFile]
<!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>
<title> new document </title>
<meta name="author" content="http://blog.csdn.net/xxd851116" />
<style type="text/css">
div{
width:100px;
height:50px;
background-color:red;display:block;
}
div:hover{
background-color:yellow;
}
</style>
</head> <body>
<div> 为什么 <div>
</body>
</html>[/code]