JSFiddle - React, Tailwind, and code Playground

HTML

<div class="masthead">
    <h1>Page Title</h1>
</div>
<div class="content">
    <h2>Content</h2>
</div>

CSS

* {
    padding:0;
    margin:0;
}

.masthead {
    width:100%;
    position:relative;
    background:url(http://demo.athemes.com/moesia/wp-content/themes/moesia/images/header.jpg);
    background-attachment:fixed;
}

h1 {
    position:fixed;
    z-index:1;
    top:40%;
    width:100%;
    color:white;
    text-align:center;
    font-size:5em;
    text-transform:uppercase;
    text-shadow:0 0 5px #222;
}

.content {
    position:relative;
    z-index:2;
    min-height:1000px;
    background:white;
}

JavaScript

jQuery(function($) {
	var height = $(window).height();
    var masthead = $('.masthead');
    
	masthead.css('height', height);
	$(window).resize(function() {
		var height = $(window).height(); 
		masthead.css('height', height);
	});	
});