[英]Responsive website menu z-index
我正在尝试建立一个响应式菜单。 添加正确的Z索引时遇到一些问题。
这是网站: http : //erlendvanlandeghem.be/当您缩小窗口时,您应该得到一个显示“显示菜单”的按钮。 然后,菜单在内容后面展开(cwrap)。 我曾尝试用z-indexes修复它,但这似乎不起作用。
有什么帮助吗? 提前致谢!
只需添加position:relative;
到以下ID #navwrapper
在302数字行处添加此代码main.css。
@media only screen and (max-width: 480px)
#navwrapper {
width: 100%;
left: -1px;
text-align: center;
background-color: transparent;
max-width: 480px;
position: relative;
z-index: 10;
}
将z-index添加到#navwrapper即可使用
#navwrapper {
width: 240px;
left: -1px;
background-color: #333333;
height: 100%;
position: fixed;
float: left;
text-align: left;
box-shadow: 1px 0px 3px #888888;
z-index: 999;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.