1.当img元素包含在多个层级关系里时,只要触发了img元素的父元素的hasLayout,那么就会造成在IE6\7下A标签失效。

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<style>
a {  
   /* 这句需要加上, 当bug出现时, 超链接默认的手形图标会消失 */ 
   border:1px solid red;
    
}  
a span {  
   /* 只要触发hasLayout, 就可以看到这个bug, 如: float, zoom, position,inline-block等 */ 
     display:inline-block;
     
   height: 100%;  
   border:1px solid red;
}

</style>

</head>
<body>

<a href="http://www.ipmtea.net"><span><img src="pics/psb.jpg" alt="msg" /></span></a> 

</body>
</html>

 

相关文章:

  • 2022-12-23
  • 2021-07-21
  • 2021-05-27
  • 2021-12-21
  • 2021-12-21
  • 2021-11-17
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-07
  • 2021-10-19
  • 2021-09-05
  • 2022-12-23
相关资源
相似解决方案