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 class="box background-tint">
    <div class="u-relative">asdasd</div>
  </div>
  
</body>
</html>
 
.box {
  width: 300px;
  height: 300px;
  background-size: cover;
  background-image: url('http://placehold.it/300');
  color: red;
}
.background-tint { position: relative; }
.background-tint::after {
  content: "";
  position: absolute; 
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,.5);
  margin: auto;
}
.u-relative { position: relative; z-index: 1; } 
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers