我在这里有一个简单的例子:http: //jsfiddle.net/V97TF/1/。基本上我需要在图像上绝对定位链接,但由于某种原因,z-index 在任何 IE 中都不起作用 :( 可以请人帮忙吗?
提前致谢!
代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<style>
#map {
float:left;
position:relative;
}
#map img {
position:relative;
z-index:9;
}
#map .links {
position:absolute;
width:100%;
height:100%;
z-index:10;
top:0;
left:0;
}
#map .links li {
width:60px;
height:25px;
position:absolute;
}
#map .links a {
display:block;
height:100%;
width:100%;
}
.karlovy-vary { left:41px; top:87px; }
.plzen { left:60px; top:143px; }
.usti-nad-labem { left:110px; top:42px; }
.ceske-budejovice { left:130px; top:226px; }
.liberec { left:193px; top:34px; }
.hradec-kralove { left:243px; top:88px; }
.pardubice { left:244px; top:132px; }
.jihlava { left:241px; top:183px; }
.brno { left:314px; top:210px; }
.olomouc { left:353px; top:156px; }
.zlin { left:397px; top:204px; }
.ostrava { left:400px; top:134px; }
</style>
</head>
<body>
<div id="map">
<img src="http://placekitten.com/501/291">
<ul class="links map1">
<li class="karlovy-vary"><a href="#"></a></li>
<li class="plzen"><a href="#"></a></li>
<li class="usti-nad-labem"><a href="#"></a></li>
<li class="ceske-budejovice"><a href="#"></a></li>
<li class="liberec"><a href="#"></a></li>
<li class="hradec-kralove"><a href="#"></a></li>
<li class="pardubice"><a href="#"></a></li>
<li class="jihlava"><a href="#"></a></li>
<li class="brno"><a href="#"></a></li>
<li class="olomouc"><a href="#"></a></li>
<li class="zlin"><a href="#"></a></li>
<li class="ostrava"><a href="#"></a></li>
</ul>
</div>
</body>
</html>