new drop down menü
This commit is contained in:
parent
0f34781928
commit
fe58239332
@ -113,6 +113,7 @@
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
font-size: 250%;
|
||||
}
|
||||
|
||||
.mobile-menu {
|
||||
@ -151,7 +152,7 @@
|
||||
|
||||
.mobile-menu.show {
|
||||
display: block; /* Bei Klick auf das Symbol anzeigen */
|
||||
background-color: red;
|
||||
background-color: rgb(104, 0, 0);
|
||||
}
|
||||
|
||||
.menu {
|
||||
@ -212,27 +213,7 @@
|
||||
|
||||
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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user