我希望以下代码'max-button'可见,但它隐藏在网格后面.怎么了?
<html>
<head>
<title>Grid</title>
<style>
#sketch {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: transparent url(grid.gif) repeat scroll 0 0;
z-index: 0;
}
#max-button {
z-index: 9999;
}
</style>
</head>
<body>
<div id="sketch"></div>
<div id="max-button"><img src="maximize.gif"></div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
以下是两张图片:
maximize.gif:alt text http://www.freeimagehosting.net/uploads/8c213c4a8a.gif grid.gif:alt text http://www.freeimagehosting.net/uploads/af716eaf7d.gif