Skip to content

Instantly share code, notes, and snippets.

@thealscott
thealscott / gist:c51011a4e4855d7fe1eb
Created February 12, 2016 16:36
more reliable touch detection
function isTouchDevice() {
return (('ontouchstart' in window)
|| (navigator.MaxTouchPoints > 0)
|| (navigator.msMaxTouchPoints > 0));
}
@thealscott
thealscott / animated-background.css
Created February 9, 2017 15:12
Animated tiled background
@keyframes animatedBackground {
from { background-position: 0 0; }
to { background-position: -200px 0; }
}
.background {
display: block;
height: 200px;
width: 100%;
background: url(../assets/img/pattern.svg);