JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta charset=utf-8 />
</head>
<body>
<div id="video">
<object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/_-wDuGDtjCc?fs=1&hl=en_GB"></param><param name="wmode" value="transparent"></param>
<param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/_-wDuGDtjCc?fs=1&hl=en_GB" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>
</div>
<div id="overlay"></div>
<div id="modal">Why won't the overlay cover the Flash?</div>
</body>
</html>
CSS
#overlay {
display: none;
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
background: #111;
opacity: 0.95;
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity750)";
filter: alpha(opacity=70);
z-index: 100;
}
#modal {
display: none;
width: 400px;
height: 50px;
position: fixed;
top: 50%;
left: 50%;
margin-top: -25px;
margin-left: -200px;
z-index: 110;
background: #fff;
text-align: center;
padding: 1.3em;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
font-size: 1.3em;
line-height: 1.4em;
}
#video {
position: relative;
z-index: -1;
}
JavaScript
$(function() {
setTimeout(function() {
$('#overlay').fadeIn(500, function() { $('#modal').show(); });
}, 1000);
});