z-index

書式 z-index:Z座標
対象位置指定が可能な要素
継承しない
初期値 auto
解説
Z座標(奥行き。0以上の値)の位置を指定します。autoを指定すると自動的に処理されます。
サンプルコード
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>Sample</title>
<style type="text/css"><!--
body { margin:0px; }
.box1 { position:absolute;border:1px black solid;
left:10px;
top:10px;
width:300px;
height:100px;
z-index:2;
}
.box2 { position:absolute;border:1px black solid;background-color:gray;
left:40px;
top:40px;
width:300px;
height:100px;
z-index:3;
}
--></style>
</head>
<body>
<img src="Default.png">
<div class="box1">Dashboard Sample Text</div>
<div class="box2">Dashboard Sample Text</div>
</body>
</html>
実際のサンプルをダウンロード