Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  <div class='overlay'>Click outside to close.</div>
</body>
</html>
 
* {
  -moz-box-sizing: border-box;
       box-sizing: border-box;
}
html,
body {
  height: 100%;
  margin: 0;
  font: bold 64px/70px helvetica;
  background: #41B7D8;
  color: red;
}
.overlay {
  position: absolute;
  top: 0; right: 0;
  bottom: 0; left: 0;
  height: 80%;
  width: 80%;
  margin: auto;
  padding: 20px;
  background: #FFF;
  box-shadow: 1px 4px 40px rgba(0,0,0,0.5);
}
 
var overlay = document.querySelector('.overlay');
overlay.addEventListener('click', function(event) {
  event.stopPropagation();
});
// Remove the overlay when a 'click'
// is heard on the document (<html>) element
document.addEventListener('click', function(event) {
  overlay.parentNode.removeChild(overlay);
});
Output

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

Dismiss x