To create a simple HTML and CSS layout as described, you’ll first need two images you want to display and a video file to set as the background. For this example, the images and video files should be stored in the same directory as your HTML file or appropriately linked if you're hosting them externally.
Below is a basic implementation of your request:
HTML (index.html)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tournament Pause Screen</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="video-background">
<video autoplay muted loop id="bg-video">
<source src="background-video.mp4" type="video/mp4">
Your browser does not support HTML5 video.
</video>
</div>
<div class="content">
<div class="image-container">
<img src="image1.jpg" alt="Image 1">
<p>Team 1</p>
</div>
<div class="vs-text">
<span>VS</span>
<p>Best of 1</p>
</div>
<div class="image-container">
<img src="image2.jpg" alt="Image 2">
<p>Team 2</p>
</div>
</div>
</body>
</html>
CSS (styles.css)
body, html {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
overflow: hidden;
}
.video-background {
position: fixed;
right: 0;
bottom: 0;
min-width: 100%;
min-height: 100%;
z-index: -1000;
background: black; /* fallback color */
}
#bg-video {
width: 100%; /* covering the full screen */
height: auto;
}
.content {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
display: flex;
align-items: center;
justify-content: space-around;
width: 80%;
}
.image-container {
text-align: center;
}
.image-container img {
max-height: 500px; /* Adjust based on your preference */
margin: auto;
display: block; /* For centering images */
}
.vs-text {
text-align: center;
}
.vs-text span {
font-size: 2em; /* Large VS text */
display: block;
}
.vs-text p {
margin-top: 10px; /* Small space between 'VS' and 'Best of 1' */
font-size: 1em;
}
This is a foundational layout and style. You should tweak the CSS based on your exact needs, especially taking sizing, colors, and the video's visibility into account. This setup assumes you have a relatively modern browser that supports these features and that your images and video are named appropriately (image1.jpg, image2.jpg, and background-video.mp4) and located in the same folder as your HTML and CSS files. Remember, serving video content can significantly impact page load times, especially if the video is large, so optimizing file size and considering different formats (like WebM alongside MP4 for broader compatibility) is advisable.