test seite auf test seite
This commit is contained in:
parent
4b58dad683
commit
0f34781928
240
html+css.html
Normal file
240
html+css.html
Normal file
@ -0,0 +1,240 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Br0tcraft</title>
|
||||
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: "Roboto";
|
||||
src: url("/fonts/Roboto/Roboto-Regular.ttf");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Orbitron";
|
||||
src: url("/fonts/Orbitron/Orbitron-Black.ttf");
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: "Orbitron";
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.header-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.header-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
object-position: 50% 5%;
|
||||
}
|
||||
|
||||
.container {
|
||||
position: absolute;
|
||||
right: 32px;
|
||||
left: 32px;
|
||||
top: 16px;
|
||||
font-family: Orbitron;
|
||||
font-size: 24px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.logo {
|
||||
width: calc(15% * 2);
|
||||
}
|
||||
|
||||
.menu-link-home {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
margin-left: 0px;
|
||||
font-size: 50px;
|
||||
}
|
||||
|
||||
.menu-link {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
margin-left: 16px;
|
||||
}
|
||||
|
||||
.menu-link:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.headline {
|
||||
text-align: center;
|
||||
color: rgb(0, 0, 0);
|
||||
font-size: 40px;
|
||||
text-shadow: 5px 5px 3px rgba(5, 0, 0, 0.26);
|
||||
}
|
||||
|
||||
.mobile-menu-icon {
|
||||
display: none; /* Standardmäßig ausblenden */
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.hamburger-icon {
|
||||
width: 30px;
|
||||
height: 3px;
|
||||
background-color: white;
|
||||
margin: 6px 0;
|
||||
}
|
||||
|
||||
.menu-links {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.menu-links.show {
|
||||
display: flex; /* Bei Klick auf das Symbol anzeigen */
|
||||
}
|
||||
|
||||
.menu {
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #333; /* Hintergrundfarbe des Menüs */
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.menu-link-mobile {
|
||||
color: white;
|
||||
padding: 20px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.mobile-menu {
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: transparent;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 768px) {
|
||||
.mobile-menu-icon {
|
||||
display: block; /* Bei kleinen Bildschirmen anzeigen */
|
||||
}
|
||||
|
||||
.hamburger-icon {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.menu-links {
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
position: absolute;
|
||||
top: 80px;
|
||||
left: 0;
|
||||
background-color: #333;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.menu-links.show {
|
||||
display: flex; /* Bei Klick auf das Symbol anzeigen */
|
||||
}
|
||||
|
||||
.mobile-menu.show {
|
||||
display: block; /* Bei Klick auf das Symbol anzeigen */
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
.menu {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.close-menu {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
.close-menu {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
font-size: 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="header-container">
|
||||
<img class="header-image" src="img/Background.png" />
|
||||
</div>
|
||||
<div class="container">
|
||||
<a class="menu-link-home" href="">BR0TCRAFT</a>
|
||||
<div class="mobile-menu-icon" onclick="toggleMenu()">
|
||||
<div class="hamburger-icon"></div>
|
||||
<div class="hamburger-icon"></div>
|
||||
<div class="hamburger-icon"></div>
|
||||
</div>
|
||||
<div class="menu-links">
|
||||
<a class="menu-link" href="">Kontakt</a>
|
||||
<a class="menu-link" href="">Spiele</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="menu">
|
||||
<div class="close-menu" onclick="toggleMenu()">✖</div>
|
||||
<a class="menu-link-mobile" href="">Kontakt</a>
|
||||
<a class="menu-link-mobile" href="">Spiele</a>
|
||||
</div>
|
||||
<div class="mobile-menu" onclick="toggleMenu()">
|
||||
<a class="menu-link-mobile" href="">Kontakt</a>
|
||||
<a class="menu-link-mobile" href="">Spiele</a>
|
||||
</div>
|
||||
<h1 class="headline">Meine Werke</h1>
|
||||
|
||||
<script>
|
||||
function toggleMenu() {
|
||||
var menuLinks = document.querySelector('.menu-links');
|
||||
var mobileMenu = document.querySelector('.mobile-menu');
|
||||
var body = document.body;
|
||||
|
||||
menuLinks.classList.toggle('show');
|
||||
mobileMenu.classList.toggle('show');
|
||||
|
||||
if (mobileMenu.classList.contains('show')) {
|
||||
body.style.backgroundColor = 'red';
|
||||
} else {
|
||||
body.style.backgroundColor = 'transparent';
|
||||
}
|
||||
}
|
||||
|
||||
// Überwache Änderungen der Bildschirmgröße
|
||||
window.addEventListener('resize', function () {
|
||||
var screenWidth = window.innerWidth;
|
||||
var mobileMenu = document.querySelector('.mobile-menu');
|
||||
var body = document.body;
|
||||
|
||||
// Überprüfe, ob das mobile Menü sichtbar ist
|
||||
if (mobileMenu.classList.contains('show')) {
|
||||
body.style.backgroundColor = 'red';
|
||||
} else {
|
||||
body.style.backgroundColor = 'white';
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
BIN
img/DropDownMobile.png
Normal file
BIN
img/DropDownMobile.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 695 KiB |
BIN
img/Hamburger.png
Normal file
BIN
img/Hamburger.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 1.8 KiB |
Loading…
x
Reference in New Issue
Block a user