<section class="overlay">
		<div class="textarea">
			<h1>This is a Demo</h1>
			<p>For basic CSS Overlay</p>
		</div>
	</section>
* {
	margin: 0;
	padding: 0;
}

.overlay {
	width: 100%;
	height: 500px;
	background: url(https://images.pexels.com/photos/255377/pexels-photo-255377.jpeg?w=940&h=650&auto=compress&cs=tinysrgb) no-repeat center center;
	background-size: cover;
	position: relative;
	z-index: 1;
}

.overlay:before {
	position: absolute;
	content: '';
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,.7);
	top: 0;
	left: 0;
	z-index: -1;
}

.textarea {
	text-align: center;
	padding-top: 200px;
	color: #fff;
	font-family: sans-serif;
}

.textarea h1 {
	font-size: 50px;
	line-height: 60px;
	margin-bottom: 0;
	padding-bottom: 0;
}

.textarea p {
	font-size: 30px;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.