mirror of
https://github.com/kevinveenbirkenbach/homepage.veen.world.git
synced 2025-09-10 03:37:11 +02:00
Refactored code and implemented that menüs open to the top
This commit is contained in:
@@ -1,15 +1,20 @@
|
||||
/* Dropdown-Menüs verstecken */
|
||||
.dropdown-menu {
|
||||
display: none;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
width: max-content !important; /* Passt die Breite an das breiteste Item an */
|
||||
box-sizing: border-box; /* Berücksichtigt Innenabstand und Rahmen */
|
||||
/* Top-Level Dropdown-Menü */
|
||||
.nav-item .dropdown-menu {
|
||||
position: absolute; /* Wichtig für Positionierung */
|
||||
top: 100%; /* Standardmäßige Öffnung nach unten */
|
||||
left: 0;
|
||||
z-index: 1050; /* Damit das Menü über anderen Elementen liegt */
|
||||
}
|
||||
|
||||
/* Positionierung von Submenüs */
|
||||
/* Submenu-Position */
|
||||
.dropdown-submenu > .dropdown-menu {
|
||||
position: absolute;
|
||||
transition: opacity 0.3s ease, visibility 0.3s ease;
|
||||
top: 0;
|
||||
left: 100%; /* Öffnen nach rechts */
|
||||
z-index: 1050;
|
||||
}
|
||||
|
||||
/* Sicherstellen, dass der Übergang smooth ist */
|
||||
.dropdown-menu {
|
||||
transition: all 0.3s ease-in-out;
|
||||
}
|
||||
|
Reference in New Issue
Block a user