<h2>Responsive Cutout Text Effect</h2>

<div class="image-container">
  <div class="text">Virtual Reality </div>
</div>

<p>This example creates a responsive cutout text/knockout text - text that appears cut out on top of a background image.</p>
<p>Resize the browser window to see the responsive effect.</p>
<p><strong>Note:</strong> This example does not work in Internet Explorer or Edge.</p>
body {font-family: Arial, Helvetica, sans-serif;}

.image-container {
  background-image: url("https://adaptabiz.com/wp-content/uploads/2020/09/google-cardboard-min.jpg");
  background-size: contain;
  position: relative;
  height: 300px;
}

.text {
  background-color: white;
  color:    #1c2833   ;
  font-size: 6vw; 
  font-weight: bold;
  margin: 0 auto;
  padding: 1px;
  width: 50%;
  text-align: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.