Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
backtotop tablet
document.addEventListener("touchmove", ScrollStart, false);
document.addEventListener("scroll", Scroll, false);
document.addEventListener("touchcancel", Scroll, false);
function ScrollStart() {
//hide back to top button now if it exists
}
function Scroll() {
//show back to top button now if scroll far enough
}
@bingeboy
Copy link
Author

-webkit-animation: fadein 2s; /* Safari and Chrome */
   -moz-animation: fadein 2s; /* Firefox */
    -ms-animation: fadein 2s; /* Internet Explorer */
     -o-animation: fadein 2s; /* Opera */
        animation: fadein 2s;

}

@Keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}

/* Firefox */
@-moz-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}

/* Safari and Chrome */
@-webkit-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}

/* Internet Explorer */
@-ms-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}​

@bingeboy
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment