淘宝模板得针对ie6做优化 鼠标上来图片不变化 解决方案 a:hover

不是啥创新,就是遇到这个问题又从新梳理了一下。

解决方案很简单 css里面加入个 a:hover {border:0;} 即可解决

付上参考教程和我写的代码

http://www.blueidea.com/tech/web/2009/6796.asp

PS:顺道说下ie6环境实在是太鸡贼了。反正win7下 用ietester还行,还有一个是IECollection也不错。xp下也都支持,不过支持度各有不同,建议就都装了好了。

<!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" />
<title>ie6 能用的 :hover</title>
<style>
.myList a { width:310px; height:280px; display:block;}
.myList a .imgBtn { display:none; width:310px; height:280px;}
.myList a:hover .imgBtn{ display:block;}
/* 加入ie6能显示出来效果的css */
.myList a:hover { border:0;}
</style>
</head>

<body>
<div class="myList"><a href="#" style="background:url(1.jpg) no-repeat 0 0;"><div class="imgBtn" style="background:url(2.jpg) no-repeat 0 0;"></div></a></div>
</body>
</html>
---------------------------------------------
生活的意义并不是与他人争高下,而在于享受努力实现目标的过程,结果是对自己行动的嘉奖。
↑面的话,越看越不痛快,应该这么说:

生活的意义就是你自己知道你要做什么,明确目标。没有目标,后面都是瞎扯!
原文地址:https://www.cnblogs.com/pengchenggang/p/2890536.html