Skip to content

Instantly share code, notes, and snippets.

View joshfry's full-sized avatar

Josh Fry joshfry

View GitHub Profile
@joshfry
joshfry / easy_parallax.js
Created March 26, 2014 05:40
Easy Parallax
(function($){
function parallax() {
var scrolled = $(window).scrollTop();
$('.parallax')
.css('top', 'calc(140px + ' + (scrolled * .6) + 'px)')
.css('opacity', 1 - (scrolled * .003));
};
@joshfry
joshfry / dragon-slayer-game.html
Last active December 26, 2015 04:28
Dragon Slayer Game
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width">
<style>
* {margin: 0; padding: 0; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; }
html { font-size: 100%; color: #444; }
body { font: 1em/1.5 sans-serif; max-width: 55em; margin: auto; padding: 0 1em; background: #0C1021; }
h1 { margin: 1em 0; line-height: 1; color: #e74c3c }