简体   繁体   中英

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?

https://jsfiddle.net/g3nn0cvy

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.

I have updated your fiddle with an example

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM