Last active
January 14, 2018 18:06
-
-
Save webbingstudio/afe5e8056cdae8a4f1c62ac08404a3bd to your computer and use it in GitHub Desktop.
対象となる要素がスクロールによって画面から消えたときに、.is-active を付与する
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage:
HTML
<div class="globalnav js-fixnav">(navigation)</div>
CSS
.globalnav.is-active { position: fixed; top: 0; left: 0; width: 100%; z-index: 999; }