Last active
March 3, 2017 00:05
-
-
Save reidblomquist/3cc7e48e00596f37b138842e68d2e838 to your computer and use it in GitHub Desktop.
Quick Vanilla JS Nav Hideymajig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.nav { // you prob need more stuff like z-index etc but here's the gist to make the hidey part work | |
position: fixed; | |
top: 0; | |
-webkit-transition: top 0.2s ease-in-out; | |
-ms-transition: top 0.2s ease-in-out; | |
-o-transition: top 0.2s ease-in-out; | |
transition: top 0.2s ease-in-out; | |
&.nav-up { | |
top: -110px; // whatever your nav height is hurr | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment