我有这个导航栏:
jQuery(function($) {
jQuery('.nav li.dropdown').hover(function() {
jQuery(this).addClass('open');
}, function() {
jQuery(this).removeClass('open');
});
});
.dropdown-menu {
width: 100%;
position: fixed;
top: 178px;
left: 0;
z-index: 1000;
display: none;
float: left;
min-width: 160px;
padding: 5px 0;
margin: 0 auto;
text-align: center;
}
.dropdown-menu li {
display: inline-block;
}
.dropdown-menu li.dropdown .dropdown-menu {
top: 210px;
}
.dropdown-menu li.dropdown {
background: url(http://decombh.org/img/nav_down.png) no-repeat bottom right !important;
background-position: 5px 9px !important;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="menu-demenu-container">
<ul id="menu-demenu" class="nav navbar-nav">
<li id="menu-item-62" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-home current-menu-item page_item page-item-56 current_page_item menu-item-has-children menu-item-62 dropdown active"><a href="http://localhost/wordpress/">HOME</a>
<ul class="dropdown-menu">
<li id="menu-item-1306" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1306"><a href="http://localhost/wordpress/index.php/contact/">ADRESSE</a></li>
<li id="menu-item-1325" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1325"><a href="http://localhost/wordpress/index.php/infos-zum-ritten/">INFOS</a></li>
<li id="menu-item-1326" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1326"><a href="http://localhost/wordpress/index.php/gutscheine/">GUTSCHEINE</a></li>
<li id="menu-item-1327" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1327"><a href="http://localhost/wordpress/index.php/waitere-annehmlichkeiten/">ANNEHMLICHKEITEN</a></li>
<li id="menu-item-1328" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1328"><a href="http://localhost/wordpress/index.php/bankdaten/">BANKDATEN</a></li>
</ul>
</li>
<li id="menu-item-436" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-436 dropdown"><a href="http://localhost/wordpress/index.php/camping/">CAMPING</a>
<ul class="dropdown-menu">
<li id="menu-item-977" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-977"><a href="http://localhost/wordpress/index.php/paket/">PAKET</a></li>
<li id="menu-item-1169" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1169"><a href="http://localhost/wordpress/index.php/kategorie-a/">KATEGORIE A</a></li>
<li id="menu-item-1181" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1181"><a href="http://localhost/wordpress/index.php/kategorie-b/">KATEGORIE B</a></li>
<li id="menu-item-1180" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1180"><a href="http://localhost/wordpress/index.php/kategorie-c/">KATEGORIE C</a></li>
<li id="menu-item-1023" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1023"><a href="http://localhost/wordpress/index.php/hunde/">HUNDE</a></li>
<li id="menu-item-1278" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1278"><a href="http://localhost/wordpress/index.php/platz/">PLATZ</a></li>
</ul>
</li>
<li id="menu-item-523" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-523 dropdown"><a href="http://localhost/wordpress/index.php/baumg/">BAUM</a>
<ul class="dropdown-menu">
<li id="menu-item-1714" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1714"><a href="http://localhost/wordpress/index.php/haus/">HAUS</a></li>
<li id="menu-item-1258" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1258"><a href="http://localhost/wordpress/index.php/rund/">RUND</a></li>
<li id="menu-item-1277" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1277"><a href="http://localhost/wordpress/index.php/gut/">GUT</a></li>
</ul>
</li>
<li id="menu-item-506" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-506 dropdown"><a href="http://localhost/wordpress/index.php/alm/">ALM</a>
<ul class="dropdown-menu">
<li id="menu-item-1259" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1259"><a href="http://localhost/wordpress/index.php/sorglos/">SORGLOS</a></li>
<li id="menu-item-568" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-568"><a href="http://localhost/wordpress/index.php/alm1/">Alm1</a></li>
<li id="menu-item-1121" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1121"><a href="http://localhost/wordpress/index.php/alm2/">Alm2</a></li>
<li id="menu-item-1135" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1135"><a href="http://localhost/wordpress/index.php/alm3/">Alm3</a></li>
<li id="menu-item-1119" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1119"><a href="http://localhost/wordpress/index.php/alm4/">Alm4</a></li>
<li id="menu-item-1120" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1120"><a href="http://localhost/wordpress/index.php/alm5/">Alm5</a></li>
<li id="menu-item-1118" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1118"><a href="http://localhost/wordpress/index.php/alm6/">Alm6</a></li>
<li id="menu-item-1276" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1276"><a href="http://localhost/wordpress/index.php/wissen/">WISE</a></li>
</ul>
</li>
<li id="menu-item-502" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-502"><a href="http://localhost/wordpress/index.php/kids-zone/">KIDS ZONE</a></li>
<li id="menu-item-503" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-503"><a href="http://localhost/wordpress/index.php/spa-2/">SPA</a></li>
<li id="menu-item-505" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-505 dropdown"><a href="http://localhost/wordpress/index.php/gastronomie/">GASTRONOMIE</a>
<ul class="dropdown-menu">
<li id="menu-item-718" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-718"><a href="http://localhost/wordpress/index.php/pizza-2/">PIZZA</a></li>
<li id="menu-item-504" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-504"><a href="http://localhost/wordpress/index.php/restaurant/">RESTAURANT</a></li>
</ul>
</li>
<li id="menu-item-45" class="pll-parent-menu-item menu-item menu-item-type-custom menu-item-object-custom current-menu-parent menu-item-has-children menu-item-45 dropdown">
<a href="#pll_switcher"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGzSURBVHjaYvTxcWb4+53h3z8GZpZff/79+v3n/7/fDAz/GHAAgABi+f37e3FxOZD1Dwz+/v3z9y+E/AMFv3//+Qumfv9et241QACxMDExAVWfOHkJJAEW/gUEP0EQDn78+AHE/gFOQJUAAcQiy8Ag8O+fLFj1n1+/QDp+/gQioK7fP378+vkDqOH39x9A/RJ/gE5lAAhAYhzcAACCQBDkgRXRjP034R0IaDTZTFZn0DItot37S94KLOINerEcI7aKHAHE8v/3r/9//zIA1f36/R+o4tevf1ANYNVA9P07RD9IJQMDQACxADHD3z8Ig4GMHz+AqqHagKp//fwLVA0U//v7LwMDQACx/LZiYFD7/5/53/+///79BqK/EMZ/UPACSYa/v/8DyX9A0oTxx2EGgABi+a/H8F/m339BoCoQ+g8kgRaCQvgPJJiBYmAuw39hxn+uDAABxMLwi+E/0PusRkwMvxhBGoDkH4b/v/+D2EDyz///QB1/QLb8+sP0lQEggFh+vGXYM2/SP6A2Zoaf30Ex/J+PgekHwz9gQDAz/P0FYrAyMfz7wcDAzPDtFwNAgAEAd3SIyRitX1gAAAAASUVORK5CYII="
title="Deutsch" alt="Deutsch"><span style="margin-left:0.3em;">Deutsch</span></a>
<ul class="dropdown-menu">
<li class="lang-item lang-item-2 lang-item-en lang-item-first menu-item menu-item-type-custom menu-item-object-custom menu-item-45-en">
<a href="http://localhost/wordpress/index.php/en/homeen/"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAflJREFUeNpinDRzn5qN3uFDt16+YWBg+Pv339+KGN0rbVP+//2rW5tf0Hfy/2+mr99+yKpyOl3Ydt8njEWIn8f9zj639NC7j78eP//8739GVUUhNUNuhl8//ysKeZrJ/v7z10Zb2PTQTIY1XZO2Xmfad+f7XgkXxuUrVB6cjPVXef78JyMjA8PFuwyX7gAZj97+T2e9o3d4BWNp84K1NzubTjAB3fH0+fv6N3qP/ir9bW6ozNQCijB8/8zw/TuQ7r4/ndvN5mZgkpPXiis3Pv34+ZPh5t23//79Rwehof/9/NDEgMrOXHvJcrllgpoRN8PFOwy/fzP8+gUlgZI/f/5xcPj/69e/37//AUX+/mXRkN555gsOG2xt/5hZQMwF4r9///75++f3nz8nr75gSms82jfvQnT6zqvXPjC8e/srJQHo9P9fvwNtAHmG4f8zZ6dDc3bIyM2LTNlsbtfM9OPHH3FhtqUz3eXX9H+cOy9ZMB2o6t/Pn0DHMPz/b+2wXGTvPlPGFxdcD+mZyjP8+8MUE6sa7a/xo6Pykn1s4zdzIZ6///8zMGpKM2pKAB0jqy4UE7/msKat6Jw5mafrsxNtWZ6/fjvNLW29qv25pQd///n+5+/fxDDVbcc//P/zx/36m5Ub9zL8+7t66yEROcHK7q5bldMBAgwADcRBCuVLfoEAAAAASUVORK5CYII="
title="English" alt="English"><span style="margin-left:0.3em;">English</span></a>
</li>
<li class="lang-item lang-item-5 lang-item-it menu-item menu-item-type-custom menu-item-object-custom menu-item-45-it">
<a href="http://localhost/wordpress/index.php/it/homeit/"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE2SURBVHjaYmSYyMDwgwEE/jEw/GF4mvT0HyqQUlX9B5aEIIAAYmH4wlDtWg1SDwT//0lKSv7/D+T9/w+nYmL+//79/88fIPll0yaAAGJhYAGJP/n69O+/v0CAUAcHt2////ULqJpRVhZoA0AAsQCtAZoMVP0HiP7+RlcNBEDVYA0Mv38DNQAEEMj8vwx//wCt/AdC/zEBkgagYoAAYgF6FGj277+///wlpAEoz8AAEEAgDX/BZv/69wuoB48GRrCTAAKICajh9//fv/6CVP/++wu7BrDxQFf/YWAACCCwk0BKf0MQdg1/gBqAPv0L9ANAALEAY+33vz+S3JIgb/z5C45CBkZGRgY4UFICKQUjoJMAAoiRoZSB4RMojkHx/YPhbNVZoM3AOISQQPUK9vaQOIYAgAADAC5Wd4RRwnKfAAAAAElFTkSuQmCC"
title="Italiano" alt="Italiano"><span style="margin-left:0.3em;">Italiano</span></a>
</li>
<li class="lang-item lang-item-9 lang-item-de current-lang menu-item menu-item-type-custom menu-item-object-custom current_page_item menu-item-home menu-item-45-de">
<a href="http://localhost/wordpress/"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGzSURBVHjaYvTxcWb4+53h3z8GZpZff/79+v3n/7/fDAz/GHAAgABi+f37e3FxOZD1Dwz+/v3z9y+E/AMFv3//+Qumfv9et241QACxMDExAVWfOHkJJAEW/gUEP0EQDn78+AHE/gFOQJUAAcQiy8Ag8O+fLFj1n1+/QDp+/gQioK7fP378+vkDqOH39x9A/RJ/gE5lAAhAYhzcAACCQBDkgRXRjP034R0IaDTZTFZn0DItot37S94KLOINerEcI7aKHAHE8v/3r/9//zIA1f36/R+o4tevf1ANYNVA9P07RD9IJQMDQACxADHD3z8Ig4GMHz+AqqHagKp//fwLVA0U//v7LwMDQACx/LZiYFD7/5/53/+///79BqK/EMZ/UPACSYa/v/8DyX9A0oTxx2EGgABi+a/H8F/m339BoCoQ+g8kgRaCQvgPJJiBYmAuw39hxn+uDAABxMLwi+E/0PusRkwMvxhBGoDkH4b/v/+D2EDyz///QB1/QLb8+sP0lQEggFh+vGXYM2/SP6A2Zoaf30Ex/J+PgekHwz9gQDAz/P0FYrAyMfz7wcDAzPDtFwNAgAEAd3SIyRitX1gAAAAASUVORK5CYII="
title="Deutsch" alt="Deutsch"><span style="margin-left:0.3em;">Deutsch</span></a>
</li>
<li class="lang-item lang-item-13 lang-item-nl menu-item menu-item-type-custom menu-item-object-custom menu-item-45-nl">
<a href="http://localhost/wordpress/index.php/nl/homenl/"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFXSURBVHjaYvzPgAD/UNlYEUAAkuTgCAAIBgJggq5VoAs1qM0vdzmMz362vezjokxPGimkEQ5WoAQEKuK71zwCCKyB4c//J8+BShn+/vv/+w/D399AEox+//8FJH/9/wUU+cUoKw20ASCAWBhEDf/LyDOw84BU//kDtgGI/oARmAHRDJQSFwVqAAggxo8fP/Ly8oKc9P8/AxjiAoyMjA8ePAAIIJZ///5BVIM0MOBWDpRlZPzz5w9AALH8gyvCbz7QBrCJAAHEyKDYX15r/+j1199//v35++/Xn7+///77DST/wMl/f4Dk378K4jx7O2cABBALw7NP77/+ev3xB0gOpOHfr99AdX9/gTVASKCGP//+8XCyMjC8AwggFoZfIHWSwpwQk4CW/AYjsKlA8u+ff////v33998/YPgBnQQQQIzAaGNg+AVGf5AYf5BE/oCjGEIyAQQYAGvKZ4C6+xXRAAAAAElFTkSuQmCC"
title="Nederlands" alt="Nederlands"><span style="margin-left:0.3em;">Nederlands</span></a>
</li>
</ul>
</li>
</ul>
</div>
我想实现这种行为,当您单击导航栏项目时,假设“露营”,我想重定向到露营页面:
<a href="http://localhost/wordpress/index.php/camping/">CAMPING</a>
,然后在“ CAMPING”页面上持续显示(直到更改为另一个导航栏项目)与CAMPING项目相对应的下拉列表。 我想在此网站示例中实现类似导航栏的行为: https://www.wickinn.com/
因为我正在使用WordPress,所以HTML结构受到一些限制,因为它是由PHP Walker类生成的,并且我不打算对其进行过多更改。但是我有一个可以解决的自定义CSS和jQuery,我的示例现在是悬停了,但是为了进入所需的工作流,我尝试了如下操作:
jQuery('.nav li.dropdown').click(function(e) {
jQuery(this).addClass('open');
e.stopPropagation();
}, function() {
jQuery(this).removeClass('open');
});
但是因为我在单击导航项时正在更改窗口位置href
,这不会生效,所以有什么建议只能通过更改jQuery和CSS来实现所需的行为?
答案 0 :(得分:1)
删除 jQuery脚本下方的不再需要此操作。
jQuery('.nav li.dropdown').click(function(e) {
jQuery(this).addClass('open');
e.stopPropagation();
}, function() {
jQuery(this).removeClass('open');
});
并在样式表中添加在CSS下方。
.navbar-nav .current_page_item .dropdown-menu,
.navbar-nav .current-menu-ancestor .dropdown-menu {
display: block;
}
$('.pll-parent-menu-item').click(function() {
$(this).toggleClass('open');
})
.dropdown-menu {
width: 100%;
position: fixed;
top: 178px;
left: 0;
z-index: 1000;
display: none;
float: left;
min-width: 160px;
padding: 5px 0;
margin: 0 auto;
text-align: center;
}
.dropdown-menu li {
display: inline-block;
}
.dropdown-menu li.dropdown .dropdown-menu {
top: 210px;
}
.dropdown-menu li.dropdown {
background: url(http://decombh.org/img/nav_down.png) no-repeat bottom right !important;
background-position: 5px 9px !important;
}
.navbar-nav .current_page_item .dropdown-menu,
.navbar-nav .current-menu-ancestor .dropdown-menu {
display: block;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="menu-demenu-container">
<ul id="menu-demenu" class="nav navbar-nav">
<li id="menu-item-62" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-home current-menu-item page_item page-item-56 current_page_item menu-item-has-children menu-item-62 dropdown active"><a href="http://localhost/wordpress/">HOME</a>
<ul class="dropdown-menu">
<li id="menu-item-1306" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1306"><a href="http://localhost/wordpress/index.php/contact/">ADRESSE</a></li>
<li id="menu-item-1325" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1325"><a href="http://localhost/wordpress/index.php/infos-zum-ritten/">INFOS</a></li>
<li id="menu-item-1326" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1326"><a href="http://localhost/wordpress/index.php/gutscheine/">GUTSCHEINE</a></li>
<li id="menu-item-1327" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1327"><a href="http://localhost/wordpress/index.php/waitere-annehmlichkeiten/">ANNEHMLICHKEITEN</a></li>
<li id="menu-item-1328" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1328"><a href="http://localhost/wordpress/index.php/bankdaten/">BANKDATEN</a></li>
</ul>
</li>
<li id="menu-item-436" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-436 dropdown"><a href="http://localhost/wordpress/index.php/camping/">CAMPING</a>
<ul class="dropdown-menu">
<li id="menu-item-977" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-977"><a href="http://localhost/wordpress/index.php/paket/">PAKET</a></li>
<li id="menu-item-1169" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1169"><a href="http://localhost/wordpress/index.php/kategorie-a/">KATEGORIE A</a></li>
<li id="menu-item-1181" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1181"><a href="http://localhost/wordpress/index.php/kategorie-b/">KATEGORIE B</a></li>
<li id="menu-item-1180" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1180"><a href="http://localhost/wordpress/index.php/kategorie-c/">KATEGORIE C</a></li>
<li id="menu-item-1023" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1023"><a href="http://localhost/wordpress/index.php/hunde/">HUNDE</a></li>
<li id="menu-item-1278" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1278"><a href="http://localhost/wordpress/index.php/platz/">PLATZ</a></li>
</ul>
</li>
<li id="menu-item-523" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-523 dropdown"><a href="http://localhost/wordpress/index.php/baumg/">BAUM</a>
<ul class="dropdown-menu">
<li id="menu-item-1714" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1714"><a href="http://localhost/wordpress/index.php/haus/">HAUS</a></li>
<li id="menu-item-1258" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1258"><a href="http://localhost/wordpress/index.php/rund/">RUND</a></li>
<li id="menu-item-1277" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1277"><a href="http://localhost/wordpress/index.php/gut/">GUT</a></li>
</ul>
</li>
<li id="menu-item-506" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-506 dropdown"><a href="http://localhost/wordpress/index.php/alm/">ALM</a>
<ul class="dropdown-menu">
<li id="menu-item-1259" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1259"><a href="http://localhost/wordpress/index.php/sorglos/">SORGLOS</a></li>
<li id="menu-item-568" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-568"><a href="http://localhost/wordpress/index.php/alm1/">Alm1</a></li>
<li id="menu-item-1121" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1121"><a href="http://localhost/wordpress/index.php/alm2/">Alm2</a></li>
<li id="menu-item-1135" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1135"><a href="http://localhost/wordpress/index.php/alm3/">Alm3</a></li>
<li id="menu-item-1119" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1119"><a href="http://localhost/wordpress/index.php/alm4/">Alm4</a></li>
<li id="menu-item-1120" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1120"><a href="http://localhost/wordpress/index.php/alm5/">Alm5</a></li>
<li id="menu-item-1118" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1118"><a href="http://localhost/wordpress/index.php/alm6/">Alm6</a></li>
<li id="menu-item-1276" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1276"><a href="http://localhost/wordpress/index.php/wissen/">WISE</a></li>
</ul>
</li>
<li id="menu-item-502" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-502"><a href="http://localhost/wordpress/index.php/kids-zone/">KIDS ZONE</a></li>
<li id="menu-item-503" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-503"><a href="http://localhost/wordpress/index.php/spa-2/">SPA</a></li>
<li id="menu-item-505" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-505 dropdown"><a href="http://localhost/wordpress/index.php/gastronomie/">GASTRONOMIE</a>
<ul class="dropdown-menu">
<li id="menu-item-718" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-718"><a href="http://localhost/wordpress/index.php/pizza-2/">PIZZA</a></li>
<li id="menu-item-504" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-504"><a href="http://localhost/wordpress/index.php/restaurant/">RESTAURANT</a></li>
</ul>
</li>
<li id="menu-item-45" class="pll-parent-menu-item menu-item menu-item-type-custom menu-item-object-custom current-menu-parent menu-item-has-children menu-item-45 dropdown">
<a href="#pll_switcher"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGzSURBVHjaYvTxcWb4+53h3z8GZpZff/79+v3n/7/fDAz/GHAAgABi+f37e3FxOZD1Dwz+/v3z9y+E/AMFv3//+Qumfv9et241QACxMDExAVWfOHkJJAEW/gUEP0EQDn78+AHE/gFOQJUAAcQiy8Ag8O+fLFj1n1+/QDp+/gQioK7fP378+vkDqOH39x9A/RJ/gE5lAAhAYhzcAACCQBDkgRXRjP034R0IaDTZTFZn0DItot37S94KLOINerEcI7aKHAHE8v/3r/9//zIA1f36/R+o4tevf1ANYNVA9P07RD9IJQMDQACxADHD3z8Ig4GMHz+AqqHagKp//fwLVA0U//v7LwMDQACx/LZiYFD7/5/53/+///79BqK/EMZ/UPACSYa/v/8DyX9A0oTxx2EGgABi+a/H8F/m339BoCoQ+g8kgRaCQvgPJJiBYmAuw39hxn+uDAABxMLwi+E/0PusRkwMvxhBGoDkH4b/v/+D2EDyz///QB1/QLb8+sP0lQEggFh+vGXYM2/SP6A2Zoaf30Ex/J+PgekHwz9gQDAz/P0FYrAyMfz7wcDAzPDtFwNAgAEAd3SIyRitX1gAAAAASUVORK5CYII="
title="Deutsch" alt="Deutsch"><span style="margin-left:0.3em;">Deutsch</span></a>
<ul class="dropdown-menu">
<li class="lang-item lang-item-2 lang-item-en lang-item-first menu-item menu-item-type-custom menu-item-object-custom menu-item-45-en">
<a href="http://localhost/wordpress/index.php/en/homeen/"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAflJREFUeNpinDRzn5qN3uFDt16+YWBg+Pv339+KGN0rbVP+//2rW5tf0Hfy/2+mr99+yKpyOl3Ydt8njEWIn8f9zj639NC7j78eP//8739GVUUhNUNuhl8//ysKeZrJ/v7z10Zb2PTQTIY1XZO2Xmfad+f7XgkXxuUrVB6cjPVXef78JyMjA8PFuwyX7gAZj97+T2e9o3d4BWNp84K1NzubTjAB3fH0+fv6N3qP/ir9bW6ozNQCijB8/8zw/TuQ7r4/ndvN5mZgkpPXiis3Pv34+ZPh5t23//79Rwehof/9/NDEgMrOXHvJcrllgpoRN8PFOwy/fzP8+gUlgZI/f/5xcPj/69e/37//AUX+/mXRkN555gsOG2xt/5hZQMwF4r9///75++f3nz8nr75gSms82jfvQnT6zqvXPjC8e/srJQHo9P9fvwNtAHmG4f8zZ6dDc3bIyM2LTNlsbtfM9OPHH3FhtqUz3eXX9H+cOy9ZMB2o6t/Pn0DHMPz/b+2wXGTvPlPGFxdcD+mZyjP8+8MUE6sa7a/xo6Pykn1s4zdzIZ6///8zMGpKM2pKAB0jqy4UE7/msKat6Jw5mafrsxNtWZ6/fjvNLW29qv25pQd///n+5+/fxDDVbcc//P/zx/36m5Ub9zL8+7t66yEROcHK7q5bldMBAgwADcRBCuVLfoEAAAAASUVORK5CYII="
title="English" alt="English"><span style="margin-left:0.3em;">English</span></a>
</li>
<li class="lang-item lang-item-5 lang-item-it menu-item menu-item-type-custom menu-item-object-custom menu-item-45-it">
<a href="http://localhost/wordpress/index.php/it/homeit/"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE2SURBVHjaYmSYyMDwgwEE/jEw/GF4mvT0HyqQUlX9B5aEIIAAYmH4wlDtWg1SDwT//0lKSv7/D+T9/w+nYmL+//79/88fIPll0yaAAGJhYAGJP/n69O+/v0CAUAcHt2////ULqJpRVhZoA0AAsQCtAZoMVP0HiP7+RlcNBEDVYA0Mv38DNQAEEMj8vwx//wCt/AdC/zEBkgagYoAAYgF6FGj277+///wlpAEoz8AAEEAgDX/BZv/69wuoB48GRrCTAAKICajh9//fv/6CVP/++wu7BrDxQFf/YWAACCCwk0BKf0MQdg1/gBqAPv0L9ANAALEAY+33vz+S3JIgb/z5C45CBkZGRgY4UFICKQUjoJMAAoiRoZSB4RMojkHx/YPhbNVZoM3AOISQQPUK9vaQOIYAgAADAC5Wd4RRwnKfAAAAAElFTkSuQmCC"
title="Italiano" alt="Italiano"><span style="margin-left:0.3em;">Italiano</span></a>
</li>
<li class="lang-item lang-item-9 lang-item-de current-lang menu-item menu-item-type-custom menu-item-object-custom current_page_item menu-item-home menu-item-45-de">
<a href="http://localhost/wordpress/"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGzSURBVHjaYvTxcWb4+53h3z8GZpZff/79+v3n/7/fDAz/GHAAgABi+f37e3FxOZD1Dwz+/v3z9y+E/AMFv3//+Qumfv9et241QACxMDExAVWfOHkJJAEW/gUEP0EQDn78+AHE/gFOQJUAAcQiy8Ag8O+fLFj1n1+/QDp+/gQioK7fP378+vkDqOH39x9A/RJ/gE5lAAhAYhzcAACCQBDkgRXRjP034R0IaDTZTFZn0DItot37S94KLOINerEcI7aKHAHE8v/3r/9//zIA1f36/R+o4tevf1ANYNVA9P07RD9IJQMDQACxADHD3z8Ig4GMHz+AqqHagKp//fwLVA0U//v7LwMDQACx/LZiYFD7/5/53/+///79BqK/EMZ/UPACSYa/v/8DyX9A0oTxx2EGgABi+a/H8F/m339BoCoQ+g8kgRaCQvgPJJiBYmAuw39hxn+uDAABxMLwi+E/0PusRkwMvxhBGoDkH4b/v/+D2EDyz///QB1/QLb8+sP0lQEggFh+vGXYM2/SP6A2Zoaf30Ex/J+PgekHwz9gQDAz/P0FYrAyMfz7wcDAzPDtFwNAgAEAd3SIyRitX1gAAAAASUVORK5CYII="
title="Deutsch" alt="Deutsch"><span style="margin-left:0.3em;">Deutsch</span></a>
</li>
<li class="lang-item lang-item-13 lang-item-nl menu-item menu-item-type-custom menu-item-object-custom menu-item-45-nl">
<a href="http://localhost/wordpress/index.php/nl/homenl/"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFXSURBVHjaYvzPgAD/UNlYEUAAkuTgCAAIBgJggq5VoAs1qM0vdzmMz362vezjokxPGimkEQ5WoAQEKuK71zwCCKyB4c//J8+BShn+/vv/+w/D399AEox+//8FJH/9/wUU+cUoKw20ASCAWBhEDf/LyDOw84BU//kDtgGI/oARmAHRDJQSFwVqAAggxo8fP/Ly8oKc9P8/AxjiAoyMjA8ePAAIIJZ///5BVIM0MOBWDpRlZPzz5w9AALH8gyvCbz7QBrCJAAHEyKDYX15r/+j1199//v35++/Xn7+///77DST/wMl/f4Dk378K4jx7O2cABBALw7NP77/+ev3xB0gOpOHfr99AdX9/gTVASKCGP//+8XCyMjC8AwggFoZfIHWSwpwQk4CW/AYjsKlA8u+ff////v33998/YPgBnQQQQIzAaGNg+AVGf5AYf5BE/oCjGEIyAQQYAGvKZ4C6+xXRAAAAAElFTkSuQmCC"
title="Nederlands" alt="Nederlands"><span style="margin-left:0.3em;">Nederlands</span></a>
</li>
</ul>
</li>
</ul>
</div>
我希望它将对您有所帮助。谢谢
答案 1 :(得分:0)
对于我在您的示例中看到的,我唯一的错误是
Mixed Content: The page at '<URL>' was loaded over HTTPS, but requested an insecure resource '<URL>'. This request has been blocked; the content must be served over HTTPS.
如果我手动将href网址设置为使用https而不是http,那么它会起作用。
不确定这是否与代码段设置有关,但是我认为值得一试。