考点:CSS3 :target伪类
<!DOCTYPE HTML>
<html>
<head>
<style>
#cont {
position: relative;
height: 100px;
}
img {
position: absolute;
width: 100px;
height: 100px;
z-index: 1;
}
img:first-child,
img:target {
z-index: 2;
}
</style>
</head>
<body>
<div id="cont">
<img id="img1" src="a.jpg">
<img id="img2" src="b.jpg">
</div>
<div>
<a href="#img1">one</a>
<a href="#img2">two</a>
</div>
</body>
</html>