Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify style and fix indentation of 500.html #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
133 changes: 71 additions & 62 deletions sample_banner/500.html
Original file line number Diff line number Diff line change
@@ -1,73 +1,82 @@
<!DOCTYPE html>

<html lang="en">

<head>
<title>Sample</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<head>
<title>Sample</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

<style>
.banner {
margin: 0 auto;
width: 500px;
height: 500px;
position: relative;
}
.backplane, .frontplane {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}
.backplane {
border: 10px solid black;
}
.frontplane {
border: 10px solid blue;
border-radius: 50px;
background-opacity: 0;
text-align: center;
z-index: 10;
}
h2 {
font-size: 3em;
line-height: 0;
text-align: center;
}
@media (prefers-color-scheme: dark) {
body {
background-color: black;
color: white;
}
<style>
.banner {
margin: 0 auto;
width: 500px;
height: 500px;
position: relative;
z-index: -2;
}
@media (prefers-color-scheme: light) {
body {
background-color: white;
color: black;
}
}

</style>
.backplane {
border: 10px solid black;
z-index: -1;
}

</head>
.frontplane {
border: 10px solid blue;
border-radius: 20px;
text-align: center;
z-index: 2;
}

<body>
<h1>Sample Banner</h1>
<p>The below is a sample of a stacked banner of two divs where the back div holds an actual image background rather than a background-color or background-image property in CSS.</p>
h2 {
font-size: 3em;
z-index: 3;
position: absolute;
line-height: 0;
top: 35%;
left: 25%;
text-align: center;
}

<div class="banner">
<div class="backplane">
<img src="background.jpg" width="100%" alt=" ">
</div>
.background-image {
z-index: 1;
top: 0;
}

.mars-image {
z-index: 3;
position: absolute;
top: 10%;
left: 35%;
}

<div class="frontplane">
<img src="mars.jpg" width="30%" margin="0 auto" alt="Mars Logo">
<h2>Hello World!</h2>
@media (prefers-color-scheme: dark) {
body {
background-color: black;
color: white;
}
}

@media (prefers-color-scheme: light) {
body {
background-color: white;
color: black;
}
}
</style>

</head>

<body>
<h1>Sample Banner</h1>
<div class="banner">
<div class="backplane">
<div class="frontplane">
<img src="background.jpg" class='background-image' width="100%" alt=" ">
<img src="mars.jpg" class='mars-image' width="30%" alt="Mars Logo">
<h2>Hello World!</h2>
</div>
</div>
</div>
</div>
<p>This text is below the banner div</p>

</body>
</html>
</body>

</html>