Share Posted November 3, 2020 Hello friends! I am trying to repeat the effect of disappearance of the menu in scrolling. As it is done here: https://greensock.com/forums/topic/24688-problems-creating-sticky-nav/ I don't want the menu color to be displayed right away, like here: See the Pen vYLpgGY by linkslegend (@linkslegend) on CodePen but I can't repeat it Who can tell you how to implement the effect correctly? See the Pen jOryXay by Ollymolly (@Ollymolly) on CodePen Link to comment Share on other sites More sharing options...
Share Posted November 3, 2020 Hey @Olga__Kondr, Look at this example See the Pen 36a752bc230ab2a00834148779bce4ec by mikeK (@mikeK) on CodePen ... or this See the Pen cd75b815a0298372fe786f66e6b1e7db?editors=0010 by mikeK (@mikeK) on CodePen Happy scrolling ... Mikel 6 Link to comment Share on other sites More sharing options...
Share Posted November 3, 2020 Hey @Olga__Kondr In your pen you are using LESS/SCSS-Syntax for the CSS, but are not pre-processing it at all. So your &--scrolled { height: 0px; } inside of your .header is invalid. I took it out of the .header and put it like this .header--scrolled { height: 0px; } and it works just fine. See the Pen 827669ed7571c9d1df3a9bc571094561 by akapowl (@akapowl) on CodePen Also note, that I added a transition and an overflow: hidden to your .header in this example. 5 Link to comment Share on other sites More sharing options...
Author Share Posted November 3, 2020 @mikel @akapowl Super, guys! You have helped me a lot!😘 1 Link to comment Share on other sites More sharing options...
Share Posted February 23, 2021 Hi Guys, could you tell me how could I? activate nav.hidden_menu after scroll pass .content so when I scroll up the nav.hidden_menu will be shown and dissapear when I continue scrolling down. deactivate/hide nav.hidden_menu when I pass top of the point .content on the way back See the Pen WNoXOLQ by timovega (@timovega) on CodePen Link to comment Share on other sites More sharing options...
Share Posted February 23, 2021 @tomektomczuk Please create a new thread with a clearer description of what you're trying to accomplish along with which part of it you're stuck on. Link to comment Share on other sites More sharing options...
Share Posted February 23, 2021 Ok, I managed to do it this way See the Pen WNoXOLQ by timovega (@timovega) on CodePen Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now