<!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=gb2312" />
<title>Dialog</title>
<style type="text/css">
a div{ width:90px; height:60px; background-image:url(http://img1.gtimg.com/news/pics/18293/18293437.jpg)}
a:visited{ width:90px; height:60px; background-image:url(http://img1.gtimg.com/news/pics/18293/18293437.jpg)}
a:hover div{ width:90px; height:60px; background-image:url(http://img1.gtimg.com/news/pics/18285/18285748.jpg)}
</style>
</head>
<body >
<a href='javascript:void(0);'><div class="c"></div></a>
</body>
</html>我希望后面不是根据div来判断的是
是根据样式判断 比如说上面的样式c
这个该怎么克修改
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Dialog</title>
<style type="text/css">
a div{ width:90px; height:60px; background-image:url(http://img1.gtimg.com/news/pics/18293/18293437.jpg)}
a:visited{ width:90px; height:60px; background-image:url(http://img1.gtimg.com/news/pics/18293/18293437.jpg)}
a:hover div{ width:90px; height:60px; background-image:url(http://img1.gtimg.com/news/pics/18285/18285748.jpg)}
</style>
</head>
<body >
<a href='javascript:void(0);'><div class="c"></div></a>
</body>
</html>我希望后面不是根据div来判断的是
是根据样式判断 比如说上面的样式c
这个该怎么克修改
解决方案 »
- 新手请教:如何使用VS2005,跟踪查找IE崩溃的原因
- 页面中所有button禁用5秒钟才可用?
- DOJO 的 License
- htm的jsp中如何将字符型转成对象
- 麻烦帮忙写个拖动层排序嘛。
- js
- 我怎么不能提交值到<iframe 里啊??
- 使用 this 指针和 prototype 实现 js 的 OO 时的一个区别
- 请问下面的语句中的style="behavior:url(YMcalendar.htc)" 这个风格调用的文件必须是.htc吗?还有怎么来理解这个文件?
- 无意打开盗号网站,顺便输几个字母,打开的却是自己的QQ空间,求解
- 关于js填写表格的问题
- JavaScript 怎么才能知道textarea 是否自动换行 在线等
a:hover .c{ width:90px; height:60px; background-image:url(http://img1.gtimg.com/news/pics/18285/18285748.jpg)}
<!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><!-- http://topic.csdn.net/u/20090611/10/6e4f25af-31a6-4d91-8d04-2d4160dcb8bc.html?37209 -->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Dialog</title>
<style type="text/css">
.c{ display:block;width:90px; height:60px; background-image:url(http://img1.gtimg.com/news/pics/18293/18293437.jpg)}
a:visited{ width:90px; height:60px; background-image:url(http://img1.gtimg.com/news/pics/18293/18293437.jpg)}
a:hover .c{ width:90px; height:60px; background-image:url(http://img1.gtimg.com/news/pics/18285/18285748.jpg)}</style>
</head>
<body >
<a href='javascript:void(0);'><div class="c"></div></a>
<br>
<a href='javascript:void(0);'><span class="c"></span></a>
</body>
</html>