CSS - właściwości z-index


z-index

kod wynik kodu
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-2">
<meta http-equiv="Content-Language" content="pl">
<title>CSS - visual formatting</title>
<link rel="Stylesheet" type="text/css" href="style.css" />
<style type="text/css">
div {
  top: 50px;
  left: 50px;
  width: 150px;
  height: 150px;
  position: absolute;
}
.one {
  background: yellow;
  z-index: 1;
}
.two {
  background: orange;
  z-index: 2;
}
.three {
  background: red;
  z-index: 3;
}
.four {
  background: BlueViolet;
  z-index: 4;
}
</style>
</head>
<body>

<div class="one">
  <div class="two">
    <div class="three">
      <div class="four"></div>
    </div>
  </div>
</div>

</body>
</html>