stobi_de hat geschrieben: Mo 23. Jun 2025, 12:28 Hast Du den Zaubertrick in dem Video gesehen?
Ein roter verschwindet und ein Black Three taucht auf - nicht von mir gewollt.

stobi_de hat geschrieben: Mo 23. Jun 2025, 12:28 Hast Du den Zaubertrick in dem Video gesehen?
Ein roter verschwindet und ein Black Three taucht auf - nicht von mir gewollt.
Code: Alles auswählen
<!-- Start Mega Menu generated by ChatGPT -->
<button class="menu-toggle" onclick="toggleMenu()">☰ Menü</button>
<nav>
<div class="menu-container">
<ul class="menu" id="mainMenu">
<li><a href="index.html">Startseite</a></li>
<li><a href="Tutorial.html">Tutorial</a></li>
<li>
<a href="#">Mega-Menü 🔻</a>
<div class="mega-menu">
<div class="column">
<h3>Seiten</h3>
<a href="https://www.mobirise-tutorials.com/Forum/" target="_blank">Forum</a>
<a href="https://www.mobirise-tutorials.com/Formular/" target="_blank">Kontakt</a>
<a href="https://www.mobirise-tutorials.com/" target="_blank">Mobirise Tutorials</a>
<a href="https://www.mobirise-tutorials.com/Suchen.php" target="_blank">Suchen</a>
</div>
<div class="column">
<h3>AI generierte Bilder</h3>
<img style="max-width: 200px;" src="https://www.mobirise-tutorials.com/AI-Mega-Menu/images/Dreimastbark.jpg" alt="Dreimastbark">
<img style="max-width: 200px;" src="https://www.mobirise-tutorials.com/AI-Mega-Menu/images/Pferd.jpg" alt="Pferd">
</div>
</div>
</li>
<li><a href="https://www.mobirise-tutorials.com/Formular/" target="_blank">Kontakt</a></li>
<!-- Button nur für Mobilgeräte -->
<li class="home-button mobile-only">
<a href="https://www.mobirise-tutorials.com/" target="_blank">Mobirise Tutorials</a>
</li>
</ul>
<!-- Button nur für Desktop -->
<div class="home-button desktop-only">
<a href="https://www.mobirise-tutorials.com/" target="_blank">Mobirise Tutorials</a>
</div>
</div>
</nav>
<!-- End Mega Menu generated by ChatGPT -->
Code: Alles auswählen
* {
box-sizing: border-box;
}
body {
margin: 0;
font-family: Jost;
}
nav {
background-color: #003366;
padding: 0;
}
.menu-container {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
padding: 0 10px;
}
.menu {
display: flex;
flex-wrap: wrap;
list-style: none;
margin: 0;
padding: 0;
font-size: 1.2rem;
}
.menu > li {
position: relative;
}
.menu > li > a {
display: flex;
align-items: center;
height: 100px;
padding: 0 20px;
color: white;
text-decoration: none;
margin: 5px 0px 5px 0px;
}
.menu > li:hover {
background-color: #0055aa;
}
.mega-menu {
position: absolute;
left: 0;
top: 100%;
width: 800px;
display: none;
background-color: #e6f0ff;
padding: 20px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
z-index: 1000;
flex-wrap: nowrap;
}
.menu > li:hover .mega-menu {
display: flex;
}
.mega-menu .column {
flex: 1;
min-width: 200px;
padding: 10px;
}
.mega-menu h3 {
margin-top: 0;
color: #003366;
}
.mega-menu a {
display: block;
color: #003366;
text-decoration: none;
padding: 5px 0;
}
.mega-menu a:hover {
text-decoration: underline;
}
.mega-menu img {
width: 100%;
height: auto;
border-radius: 8px;
margin: 10px 10px 10px 0px;
}
.home-button a {
background-color: #0055aa;
color: white;
border-radius: 30px;
padding: 10px 20px;
margin: 10px;
display: inline-block;
text-decoration: none;
transition: background-color 0.3s ease;
font-size: 1.2rem;
}
.home-button a:hover {
background-color: #0077cc;
}
.menu-toggle {
display: none;
background-color: #003366;
color: white;
padding: 15px 20px;
border: none;
width: 100%;
text-align: left;
font-size: 20px;
}
.desktop-only {
display: block;
}
.mobile-only {
display: none;
}
@media (min-width: 992px) and (max-width: 1200px) {
.mega-menu {
left: 50%;
transform: translateX(-40%);
}
}
@media (max-width: 991px) {
.menu-container {
flex-direction: column;
align-items: flex-start;
}
.menu {
display: none;
flex-direction: column;
width: 100%;
margin-bottom: 50px;
}
.menu.show {
display: flex;
}
.menu > li:hover .mega-menu {
position: static;
display: flex;
flex-direction: column;
width: 100%;
box-shadow: none;
}
.mega-menu {
width: 100%;
flex-direction: column;
}
.menu-toggle {
display: block;
}
.desktop-only {
display: none;
}
.mobile-only {
display: list-item;
margin: 0;
padding: 0;
}
.mobile-only a {
display: inline-block;
margin: 15px 15px 10px 15px;
background-color: #0055aa;
color: white;
border-radius: 30px;
padding: 10px 20px;
text-decoration: none;
transition: background-color 0.3s ease;
width: 200px;
text-align: center;
}
.mobile-only a:hover {
background-color: #0077cc;
}
.menu > li > a {
height: 50px;
}
}
Code: Alles auswählen
<!-- AI Mega Menu -->
<script>
function toggleMenu() {
const menu = document.getElementById("mainMenu");
menu.classList.toggle("show");
}
</script>
Code: Alles auswählen
{
"name": "mega_menu",
"minAppVersion": "4",
"title": "3-Spalten Mega Menü",
"largeCover": "thumbnail.png",
"ampCompatible": false,
"appScript": true,
"version": 100,
"components": [
{
"path": "block.html",
"_group": "Mega Menüs",
"typeCompatible": "type",
"_tags": ["Menu", "Navigation"],
"_isSecondary": false
}
],
"plugins": [],
"logo": "thumbnail.png",
"description": "Ein interaktives 3-Spalten-Mega-Menü für Mobirise"
}
Code: Alles auswählen
<section class="menu mega-menu" mbr-name="Mega Menu" mbr-description="Ein interaktives 3-Spalten-Mega-Menü">
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="#" mbr-text="true">Mein Verein</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item"><a class="nav-link" href="#" mbr-text="true">Start</a></li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="menu1" data-toggle="dropdown">Mehr</a>
<div class="dropdown-menu mega-menu-content">
<div class="row">
<div class="col-md-4">
<h6 mbr-text="true">Spalte 1</h6>
<a class="dropdown-item" href="#" mbr-text="true">Option 1.1</a>
<a class="dropdown-item" href="#" mbr-text="true">Option 1.2</a>
</div>
<div class="col-md-4">
<h6 mbr-text="true">Spalte 2</h6>
<a class="dropdown-item" href="#" mbr-text="true">Option 2.1</a>
<a class="dropdown-item" href="#" mbr-text="true">Option 2.2</a>
</div>
<div class="col-md-4">
<h6 mbr-text="true">Spalte 3</h6>
<a class="dropdown-item" href="#" mbr-text="true">Option 3.1</a>
<a class="dropdown-item" href="#" mbr-text="true">Option 3.2</a>
</div>
</div>
</div>
</li>
</ul>
</div>
</nav>
</section>
Code: Alles auswählen
// Aktiviert das Mega-Menü-Dropdown für Mobirise (Bootstrap 4)
document.addEventListener('DOMContentLoaded', function() {
var dropdowns = document.querySelectorAll('.dropdown-toggle');
dropdowns.forEach(function(dropdown) {
dropdown.addEventListener('click', function(e) {
e.preventDefault();
var parent = dropdown.parentElement;
var menu = parent.querySelector('.dropdown-menu');
if(menu.classList.contains('show')) {
menu.classList.remove('show');
} else {
document.querySelectorAll('.dropdown-menu.show').forEach(function(openMenu) {
openMenu.classList.remove('show');
});
menu.classList.add('show');
}
});
});
// Schließt Mega-Menü wenn außerhalb geklickt wird
document.addEventListener('click', function(e) {
if (!e.target.closest('.dropdown')) {
document.querySelectorAll('.dropdown-menu.show').forEach(function(openMenu) {
openMenu.classList.remove('show');
});
}
});
});
Code: Alles auswählen
.mega-menu .dropdown-menu {
width: 100%;
left: 0;
right: 0;
top: 100%;
padding: 20px;
}
.mega-menu-content {
display: flex;
}
.mega-menu-content .col-md-4 {
padding: 10px;
border-right: 1px solid #ddd;
}
.mega-menu-content .col-md-4:last-child {
border-right: none;
}
Code: Alles auswählen
{
"data": {
"alias": false,
"_styles": {
"padding-top": "(@paddingTop * 1rem)",
"padding-bottom": "(@paddingBottom * 1rem)",
"background-color": "@bgColor",
"*": {
"box-sizing": "border-box"
},
"body": {
"margin": "0",
"font-family": "Jost"
},
"nav": {
"background-color": "#003366",
"padding": "0"
},
".menu-container": {
"display": "flex",
"justify-content": "space-between",
"align-items": "center",
"flex-wrap": "wrap",
"padding": "0 10px"
},
".menu": {
"display": "flex",
"flex-wrap": "wrap",
"list-style": "none",
"margin": "0",
"padding": "0"
},
".menu > li": {
"position": "relative"
},
".menu > li > a": {
"display": "block",
"padding": "15px 20px",
"color": "white",
"text-decoration": "none"
},
".menu > li:hover": {
"background-color": "#0055aa"
},
".mega-menu": {
"position": "absolute",
"left": "0",
"top": "100%",
"width": "600px",
"display": "none",
"background-color": "#e6f0ff",
"padding": "20px",
"box-shadow": "0 2px 10px rgba(0, 0, 0, 0.2)",
"z-index": "1000",
"flex-wrap": "nowrap"
},
".menu > li:hover .mega-menu": {
"display": "flex"
},
".mega-menu .column": {
"flex": "1",
"min-width": "200px",
"padding": "10px"
},
".mega-menu h3": {
"margin-top": "0",
"color": "#003366"
},
".mega-menu a": {
"display": "block",
"color": "#003366",
"text-decoration": "none",
"padding": "5px 0"
},
".mega-menu a:hover": {
"text-decoration": "underline"
},
".mega-menu img": {
"width": "100%",
"height": "auto",
"border-radius": "8px",
"margin": "10px"
},
".home-button a": {
"background-color": "#0055aa",
"color": "white",
"border-radius": "30px",
"padding": "10px 20px",
"margin": "10px",
"display": "inline-block",
"text-decoration": "none",
"transition": "background-color 0.3s ease"
},
".home-button a:hover": {
"background-color": "#0077cc"
},
".menu-toggle": {
"display": "none",
"background-color": "#003366",
"color": "white",
"padding": "15px 20px",
"border": "none",
"width": "100%",
"text-align": "left",
"font-size": "16px"
},
".desktop-only": {
"display": "block"
},
".mobile-only": {
"display": "none"
},
"@media (max-width: 768px)": {
".menu-container": {
"flex-direction": "column",
"align-items": "flex-start"
},
".menu": {
"display": "none",
"flex-direction": "column",
"width": "100%"
},
".menu.show": {
"display": "flex"
},
".menu > li:hover .mega-menu": {
"position": "static",
"display": "flex",
"flex-direction": "column",
"width": "100%",
"box-shadow": "none"
},
".mega-menu": {
"width": "100%",
"flex-direction": "column"
},
".menu-toggle": {
"display": "block"
},
".desktop-only": {
"display": "none"
},
".mobile-only": {
"display": "list-item",
"margin": "0",
"padding": "0"
},
".mobile-only a": {
"display": "inline-block",
"margin": "15px 15px 10px 15px",
"background-color": "#0055aa",
"color": "white",
"border-radius": "30px",
"padding": "10px 20px",
"text-decoration": "none",
"transition": "background-color 0.3s ease"
},
".mobile-only a:hover": {
"background-color": "#0077cc"
}
}
},
"_name": "content5",
"_sourceTheme": "mobirise5",
"_customHTML": "<section data-bs-version=\"5.1\" class=\"content5\" group=\"Content\">\n <mbr-parameters>\n <header>Size</header>\n <input type=\"checkbox\" title=\"Full Width\" name=\"fullWidth\" checked=\"\">\n <input type=\"range\" inline=\"\" title=\"Top\" name=\"paddingTop\" min=\"0\" max=\"10\" step=\"1\" value=\"0\">\n <input type=\"range\" inline=\"\" title=\"Bottom\" name=\"paddingBottom\" min=\"0\" max=\"10\" step=\"1\" value=\"0\">\n <input type=\"range\" name=\"textWidth\" title=\"Width\" min=\"4\" max=\"12\" value=\"12\" step=\"1\">\n <header>Show/Hide</header>\n <input type=\"checkbox\" title=\"Title\" name=\"showTitle\">\n <input type=\"checkbox\" title=\"Subtitle\" name=\"showSubtitle\" checked=\"\">\n <header>Background</header>\n <input type=\"color\" title=\"Color\" name=\"bgColor\" value=\"#003366\">\n </mbr-parameters>\n\n <!-- Start Mega Menu generated by ChatGPT -->\n <button class=\"menu-toggle\" onclick=\"toggleMenu()\">☰ Menü</button>\n <nav>\n <div class=\"menu-container\">\n \n <ul class=\"menu\" id=\"mainMenu\">\n \n <li><a href=\"index.html\">Startseite</a></li>\n <li><a href=\"Tutorial.html\">Tutorial</a></li>\n <li>\n <a href=\"#\">Mega-Menü</a>\n <div class=\"mega-menu\">\n <div class=\"column\">\n <h3>Seiten</h3>\n <a href=\"https://www.mobirise-tutorials.com/Forum/\" target=\"_blank\">Forum</a>\n <a href=\"https://www.mobirise-tutorials.com/Formular/\" target=\"_blank\">Kontakt</a>\n <a href=\"https://www.mobirise-tutorials.com/\" target=\"_blank\">Mobirise Tutorials</a>\n <a href=\"https://www.mobirise-tutorials.com/Suchen.php\" target=\"_blank\">Suchen</a>\n </div>\n <div class=\"column\">\n <h3>AI generierte Bilder</h3>\n <img style=\"max-width: 200px;\" src=\"https://www.mobirise-tutorials.com/AI-Mega-Menu/images/Dreimastbark.jpg\" alt=\"Dreimastbark\">\n <img style=\"max-width: 200px;\" src=\"https://www.mobirise-tutorials.com/AI-Mega-Menu/images/Pferd.jpg\" alt=\"Pferd\">\n </div>\n </div>\n </li>\n <li><a href=\"https://www.mobirise-tutorials.com/Formular/\" target=\"_blank\">Kontakt</a></li>\n \n <!-- Button nur für Mobilgeräte -->\n <li class=\"home-button mobile-only\">\n <a href=\"https://www.mobirise-tutorials.com/\" target=\"_blank\">Mobirise Tutorials</a>\n </li>\n </ul>\n \n <!-- Button nur für Desktop -->\n <div class=\"home-button desktop-only\">\n <a href=\"https://www.mobirise-tutorials.com/\" target=\"_blank\">Mobirise Tutorials</a>\n </div>\n \n </div>\n </nav>\n <!-- End Mega Menu generated by ChatGPT -->\n \n</section>",
"_JSplaceholders": [],
"_PHPplaceholders": [],
"_anchor": "Mega-Menu-ChatGPT",
"_isUserblock": true,
"_cid": "uRLiCezeEF",
"_customCSS": "",
"_protectedParams": [],
"_alwaysBottom": false,
"_alwaysTop": false,
"_global": false,
"_noDrag": false,
"_positionAbsolute": false,
"_once": false,
"_params": {
"fullWidth": true,
"paddingTop": "0",
"paddingBottom": "0",
"textWidth": "12",
"showTitle": false,
"showSubtitle": true,
"bgColor": "#003366"
}
},
"themeName": "mobirise5",
"parent": "content5",
"blockName": "content5_9",
"mediaPaths": "[]",
"isUserblock": "true",
"customName": "Mega-Menu-ChatGPT"
}
Kannst Du ein Mega-Menü für meine Website erstellen. Das Menü soll auch ein Submenü als Beispiel haben. Es sollen einige Bilder im Menü eingebaut sein.
Dieser Block soll eine Mega-Menüleiste werden, die ein ausklappbares Submenü enthält, in dem sich zwei Bilder befinden. Alle Menüpunkte müssen als Links dargestellt werden. Bitte passe den Block entsprechend an.
Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast