JSFiddle - React, Tailwind, and code Playground

HTML

<body id="myBack">
  <div class="container" id="fasf">
    Основной контейнер
  </div>
</body>

CSS

body {
  position: relative;
  height: 500px;
  width: 500px;
  padding: 50px 0 0 0;
  background: url('https://image.freepik.com/free-vector/modern-abstract-background_1048-1003.jpg') no-repeat fixed 50% 50%;
}
.background {
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}
.container {
  background: #fff;
  border: 1px solid #000;
  width: 300px;
  height: 100px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  padding: 20px;
}

JavaScript

var el = document.getElementById("myBack");
function openLink (event) {
	if (el !== event.target) return;
	window.open('http://ya.ru')
}
document.getElementById("myBack").addEventListener("click", openLink);