[英]How do I stop my hamburger icon from staying with top bar so it appears with the side menu?
.hamburger
stays with my top bar which is hidden if I change the z-index, how do I stop this from happening? 停留在我的顶部栏(如果更改z-index会隐藏),如何阻止这种情况发生?
Assuming you want the topbar to be hidden when the menu is open, and have the hamburger appear on top of the menu while it is open. 假设您希望在菜单打开时隐藏顶部栏,并在打开菜单时使汉堡包出现在菜单顶部。
Use css visibility: hidden
on your #heading
, and set visibility: visible
on your .hamburger
, don't change z-indexes. 使用CSS
visibility: hidden
在#heading
,并设置visibility: visible
在.hamburger
visibility: visible
,不要更改z索引。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.