我需要有关此网站的帮助:http : //www.jsdkqwoj.eu/
在移动设备中,下拉菜单位于div下。将header / topnav元素的z-index:9999尝试,将div的z-index:-9999尝试。没有帮助。还尝试了隐藏在div下的此下拉菜单,但没有帮助。
我昨天在Google上搜索了几个小时,尝试了很多事情,但没有帮助。我也想在标题下获得页面顶部的图像,但是我对菜单修复感到满意。
我链接了页面,但这是顶部导航/标题和div的代码。
摘要:我想在div上打开菜单,并在菜单下拉菜单后显示图像。我可以像下拉div一样执行下拉菜单,但这不是我想要的。
的CSS
header {
background-color: rgba(0,0,0,0.7);
width: 100%;
height: 100px;
}
.topnav {
overflow: hidden;
background-color: rgba(0,0,0,0.7);
position: relative;
}
.topnav #myLinks {
display: none;
}
.topnav a {
color: white;
padding: 14px 16px;
text-decoration: none;
font-size: 20px;
display: block;
height: 60px;
}
.topnav2 a {
text-align: center;
}
.topnav a.icon {
display: block;
position: absolute;
right: 0;
top: 0;
height: 90px;
width: 90px;
}
.topnav2 a:hover {
background-color: rgba(0,0,0,0.4);
color: #ff6000;
}
TOPNAV
<a href="#home" class="active"><h2 class="black">OSKARI ALAJÄRVI</h2><p class="light">Portfolio</p></a>
<div class="topnav2" id="myLinks">
<a href="/">Home</a>
<a href="/category/blog/">Blog</a>
<a href="#contact">Contact</a>
</div>
<a href="javascript:void(0);" class="icon" onclick="myFunction()">
<i class="hamburger_bars" onclick="myFunction2(this)">
<div class="bar1"></div>
<div class="bar2"></div>
<div class="bar3"></div>
</i>
</a>
</div>
DIV
<div class="content">
<div class="container-fluid">
<div class="row">
<div class="col-sm pt-5 pb-5">
<div class="etusivun_teksti" data-aos="fade-up">
<?php if (have_posts()) : while(have_posts()) : the_post();?>
<?php the_content();?>
<?php endwhile; endif;?>
</div>
</div>
<div class="col-sm etusivun_kuva"></div>
</div>
</div>
</div>
.topnav2{
position:relative;
z-index:1;
}
将此添加到您的CSS。希望这行得通
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句