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 post Share on other sites
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 5 Link to post Share on other sites
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 BazVRKK 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 post Share on other sites
Author Share Posted November 3, 2020 @mikel @akapowl Super, guys! You have helped me a lot!😘 1 Link to post Share on other sites