Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
  <div>
    <p class="a">a</p>
    <p class="b">b</p>
  </div>
  <div>
    <p class="c">c</p>
  </div>
</body>
</html>
 
div {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 15px
}
p {
  position: absolute;
  font-size: 20px;
  width: 100px;
  height: 100px;
}
.a {
  background-color: blue;
  z-index: 1;
}
.b {
  background-color: green;
  z-index: 2;
  top: 20px;
  left: 20px;
}
.c {
  background-color: red;
  z-index: 3;
  top: -20px;
  left: 40px;
}
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
jinchao1992pro
0viewers