Parallax Type Thing

Developer
Size
7,000 Kb
Views
36,432

How do I make an parallax type thing?

A simple parallax pen that also adds a conditional fixed header and blurs the title. What is a parallax type thing? How do you make a parallax type thing? This script and codes were developed by Chris Maki on 12 August 2022, Friday.

Parallax Type Thing Previews

Parallax Type Thing - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Parallax Type Thing</title> <script src="http://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel='stylesheet prefetch' href='http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css'> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ @import url("http://fonts.googleapis.com/css?family=Lato:300,400,700");
html { height: 100%;
}
html body { background: #f5f7fa; font: 400 1.5em/1.5 "Lato", Helvetica, Arial, serif; color: #f5f7fa; text-align: center; height: 100%;
}
html body div.opening { background: url("http://25.media.tumblr.com/10619b725837ad67344b37ec9bcc5f56/tumblr_mubkjfBSzD1s1ujkmo2_1280.jpg") no-repeat 50% 0 fixed; -webkit-background-size: cover; -moz-background-size: cover; background-size: cover; width: 100%; height: 100%; z-index: 1;
}
html body div.opening .openingText { width: 300px; height: 150px; position: fixed; top: 33%; left: 50%; z-index: 1; margin-left: -150px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; border: 10px solid #f5f7fa;
}
html body div.opening .openingText h1 { line-height: 130px; font-size: 50px;
}
html body div.header { position: absolute; top: 100%; left: 0; width: 100%; background: #f5f7fa; z-index: 200;
}
html body div.header a { color: #434a54; width: 25%; float: left; font-size: 20px; padding-top: 20px; padding-bottom: 20px; border: 1px solid #000; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; color: #f5f7fa; background: #434a54;
}
html body div.sideBar { width: 25%; height: calc(unquote('100% - 70px')); height: calc(unquote('100% - 70px')); position: absolute; top: calc(unquote('100% + 70px')); top: -webkit-calc(unquote('100% + 70px')); left: 0; color: #434a54;
}
html body div.sideBar ul { padding-top: 100px;
}
html body div.sideBar ul li { padding: 20px; list-style-type: none;
}
html body div.firstArticle { width: 60%; text-align: justify; position: absolute; top: 120%; left: 25%; margin: 0 auto; padding: 40px 20px 20px 20px; color: #434a54; z-index: 2;
}
html body div.firstArticle h2 { font-size: 30px; padding: 25px 15px; color: #434a54;
}
html body div.firstArticle p { color: #434a54; font-size: 14px; line-height: 1.8; padding: 5px 15px;
}
/*#content { max-width: 28em; text-align: justify; margin: 0 auto; padding: 2em; }
#content p { margin: 0 0 2em; }
*/ </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body>
<div class="opening"> <div class="openingText"> <h1>PARALLAX</h1> </div>
</div>
<div class="header"><a>First Link</a><a>Second Link</a><a>Third Link</a><a>Fourth Link</a></div>
<div class="sideBar"> <ul> <li>Whatever</li> <li>Whatever</li> <li>Whatever</li> <li>Whatever</li> </ul>
</div>
<div class="content"> <div class="firstArticle"> <h2>This is the content</h2> <p>My money's in that office, right? If she start giving me some bullshit about it ain't there, and we got to go someplace else and get it, I'm gonna shoot you in the head then and there. Then I'm gonna shoot that bitch in the kneecaps, find out where my goddamn money is. She gonna tell me too. Hey, look at me when I'm talking to you, motherfucker. You listen: we go in there, and that nigga Winston or anybody else is in there, you the first motherfucker to get shot. You understand?</p> <p>Well, the way they make shows is, they make one show. That show's called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Some pilots get picked and become television programs. Some don't, become nothing. She starred in one of the ones that became nothing.</p> <p>My money's in that office, right? If she start giving me some bullshit about it ain't there, and we got to go someplace else and get it, I'm gonna shoot you in the head then and there. Then I'm gonna shoot that bitch in the kneecaps, find out where my goddamn money is. She gonna tell me too. Hey, look at me when I'm talking to you, motherfucker. You listen: we go in there, and that nigga Winston or anybody else is in there, you the first motherfucker to get shot. You understand?</p> <p>You think water moves fast? You should see ice. It moves like it has a mind. Like it knows it killed the world once and got a taste for murder. After the avalanche, it took us a week to climb out. Now, I don't know exactly when we turned on each other, but I know that seven of us survived the slide... and only five made it out. Now we took an oath, that I'm breaking now. We said we'd say it was the snow that killed the other two, but it wasn't. Nature is lethal but it doesn't hold a candle to man.</p> <p>My money's in that office, right? If she start giving me some bullshit about it ain't there, and we got to go someplace else and get it, I'm gonna shoot you in the head then and there. Then I'm gonna shoot that bitch in the kneecaps, find out where my goddamn money is. She gonna tell me too. Hey, look at me when I'm talking to you, motherfucker. You listen: we go in there, and that nigga Winston or anybody else is in there, you the first motherfucker to get shot. You understand?</p> <p>Well, the way they make shows is, they make one show. That show's called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Some pilots get picked and become television programs. Some don't, become nothing. She starred in one of the ones that became nothing.</p> <p>My money's in that office, right? If she start giving me some bullshit about it ain't there, and we got to go someplace else and get it, I'm gonna shoot you in the head then and there. Then I'm gonna shoot that bitch in the kneecaps, find out where my goddamn money is. She gonna tell me too. Hey, look at me when I'm talking to you, motherfucker. You listen: we go in there, and that nigga Winston or anybody else is in there, you the first motherfucker to get shot. You understand?</p> <p>You think water moves fast? You should see ice. It moves like it has a mind. Like it knows it killed the world once and got a taste for murder. After the avalanche, it took us a week to climb out. Now, I don't know exactly when we turned on each other, but I know that seven of us survived the slide... and only five made it out. Now we took an oath, that I'm breaking now. We said we'd say it was the snow that killed the other two, but it wasn't. Nature is lethal but it doesn't hold a candle to man.</p> <p>My money's in that office, right? If she start giving me some bullshit about it ain't there, and we got to go someplace else and get it, I'm gonna shoot you in the head then and there. Then I'm gonna shoot that bitch in the kneecaps, find out where my goddamn money is. She gonna tell me too. Hey, look at me when I'm talking to you, motherfucker. You listen: we go in there, and that nigga Winston or anybody else is in there, you the first motherfucker to get shot. You understand?</p> <p>Well, the way they make shows is, they make one show. That show's called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Some pilots get picked and become television programs. Some don't, become nothing. She starred in one of the ones that became nothing.</p> <p>My money's in that office, right? If she start giving me some bullshit about it ain't there, and we got to go someplace else and get it, I'm gonna shoot you in the head then and there. Then I'm gonna shoot that bitch in the kneecaps, find out where my goddamn money is. She gonna tell me too. Hey, look at me when I'm talking to you, motherfucker. You listen: we go in there, and that nigga Winston or anybody else is in there, you the first motherfucker to get shot. You understand?</p> <p>You think water moves fast? You should see ice. It moves like it has a mind. Like it knows it killed the world once and got a taste for murder. After the avalanche, it took us a week to climb out. Now, I don't know exactly when we turned on each other, but I know that seven of us survived the slide... and only five made it out. Now we took an oath, that I'm breaking now. We said we'd say it was the snow that killed the other two, but it wasn't. Nature is lethal but it doesn't hold a candle to man.</p> <p>My money's in that office, right? If she start giving me some bullshit about it ain't there, and we got to go someplace else and get it, I'm gonna shoot you in the head then and there. Then I'm gonna shoot that bitch in the kneecaps, find out where my goddamn money is. She gonna tell me too. Hey, look at me when I'm talking to you, motherfucker. You listen: we go in there, and that nigga Winston or anybody else is in there, you the first motherfucker to get shot. You understand?</p> <p>Well, the way they make shows is, they make one show. That show's called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Some pilots get picked and become television programs. Some don't, become nothing. She starred in one of the ones that became nothing.</p> <p>My money's in that office, right? If she start giving me some bullshit about it ain't there, and we got to go someplace else and get it, I'm gonna shoot you in the head then and there. Then I'm gonna shoot that bitch in the kneecaps, find out where my goddamn money is. She gonna tell me too. Hey, look at me when I'm talking to you, motherfucker. You listen: we go in there, and that nigga Winston or anybody else is in there, you the first motherfucker to get shot. You understand?</p> <p>You think water moves fast? You should see ice. It moves like it has a mind. Like it knows it killed the world once and got a taste for murder. After the avalanche, it took us a week to climb out. Now, I don't know exactly when we turned on each other, but I know that seven of us survived the slide... and only five made it out. Now we took an oath, that I'm breaking now. We said we'd say it was the snow that killed the other two, but it wasn't. Nature is lethal but it doesn't hold a candle to man.</p> </div>
</div>
<p>My money's in that office, right? If she start giving me some bullshit about it ain't there, and we got to go someplace else and get it, I'm gonna shoot you in the head then and there. Then I'm gonna shoot that bitch in the kneecaps, find out where my goddamn money is. She gonna tell me too. Hey, look at me when I'm talking to you, motherfucker. You listen: we go in there, and that nigga Winston or anybody else is in there, you the first motherfucker to get shot. You understand? <p>Well, the way they make shows is, they make one show. That show's called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Some pilots get picked and become television programs. Some don't, become nothing. She starred in one of the ones that became nothing.</p> <p>My money's in that office, right? If she start giving me some bullshit about it ain't there, and we got to go someplace else and get it, I'm gonna shoot you in the head then and there. Then I'm gonna shoot that bitch in the kneecaps, find out where my goddamn money is. She gonna tell me too. Hey, look at me when I'm talking to you, motherfucker. You listen: we go in there, and that nigga Winston or anybody else is in there, you the first motherfucker to get shot. You understand?</p> <p>You think water moves fast? You should see ice. It moves like it has a mind. Like it knows it killed the world once and got a taste for murder. After the avalanche, it took us a week to climb out. Now, I don't know exactly when we turned on each other, but I know that seven of us survived the slide... and only five made it out. Now we took an oath, that I'm breaking now. We said we'd say it was the snow that killed the other two, but it wasn't. Nature is lethal but it doesn't hold a candle to man.</p> <p>My money's in that office, right? If she start giving me some bullshit about it ain't there, and we got to go someplace else and get it, I'm gonna shoot you in the head then and there. Then I'm gonna shoot that bitch in the kneecaps, find out where my goddamn money is. She gonna tell me too. Hey, look at me when I'm talking to you, motherfucker. You listen: we go in there, and that nigga Winston or anybody else is in there, you the first motherfucker to get shot. You understand?</p> <p>Well, the way they make shows is, they make one show. That show's called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Some pilots get picked and become television programs. Some don't, become nothing. She starred in one of the ones that became nothing.</p> <p>My money's in that office, right? If she start giving me some bullshit about it ain't there, and we got to go someplace else and get it, I'm gonna shoot you in the head then and there. Then I'm gonna shoot that bitch in the kneecaps, find out where my goddamn money is. She gonna tell me too. Hey, look at me when I'm talking to you, motherfucker. You listen: we go in there, and that nigga Winston or anybody else is in there, you the first motherfucker to get shot. You understand?</p> <p>You think water moves fast? You should see ice. It moves like it has a mind. Like it knows it killed the world once and got a taste for murder. After the avalanche, it took us a week to climb out. Now, I don't know exactly when we turned on each other, but I know that seven of us survived the slide... and only five made it out. Now we took an oath, that I'm breaking now. We said we'd say it was the snow that killed the other two, but it wasn't. Nature is lethal but it doesn't hold a candle to man.</p>
</p> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Parallax Type Thing - Script Codes CSS Codes

@import url("http://fonts.googleapis.com/css?family=Lato:300,400,700");
html { height: 100%;
}
html body { background: #f5f7fa; font: 400 1.5em/1.5 "Lato", Helvetica, Arial, serif; color: #f5f7fa; text-align: center; height: 100%;
}
html body div.opening { background: url("http://25.media.tumblr.com/10619b725837ad67344b37ec9bcc5f56/tumblr_mubkjfBSzD1s1ujkmo2_1280.jpg") no-repeat 50% 0 fixed; -webkit-background-size: cover; -moz-background-size: cover; background-size: cover; width: 100%; height: 100%; z-index: 1;
}
html body div.opening .openingText { width: 300px; height: 150px; position: fixed; top: 33%; left: 50%; z-index: 1; margin-left: -150px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; border: 10px solid #f5f7fa;
}
html body div.opening .openingText h1 { line-height: 130px; font-size: 50px;
}
html body div.header { position: absolute; top: 100%; left: 0; width: 100%; background: #f5f7fa; z-index: 200;
}
html body div.header a { color: #434a54; width: 25%; float: left; font-size: 20px; padding-top: 20px; padding-bottom: 20px; border: 1px solid #000; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; color: #f5f7fa; background: #434a54;
}
html body div.sideBar { width: 25%; height: calc(unquote('100% - 70px')); height: calc(unquote('100% - 70px')); position: absolute; top: calc(unquote('100% + 70px')); top: -webkit-calc(unquote('100% + 70px')); left: 0; color: #434a54;
}
html body div.sideBar ul { padding-top: 100px;
}
html body div.sideBar ul li { padding: 20px; list-style-type: none;
}
html body div.firstArticle { width: 60%; text-align: justify; position: absolute; top: 120%; left: 25%; margin: 0 auto; padding: 40px 20px 20px 20px; color: #434a54; z-index: 2;
}
html body div.firstArticle h2 { font-size: 30px; padding: 25px 15px; color: #434a54;
}
html body div.firstArticle p { color: #434a54; font-size: 14px; line-height: 1.8; padding: 5px 15px;
}
/*#content { max-width: 28em; text-align: justify; margin: 0 auto; padding: 2em; }
#content p { margin: 0 0 2em; }
*/

Parallax Type Thing - Script Codes JS Codes

(function() { var parallaxScroll; parallaxScroll = (function(_this) { return function() { var currentScrollPosition; currentScrollPosition = $(_this).scrollTop(); $('.opening').css({ 'background-position': '50% ' + (-currentScrollPosition / 4) + 'px' }); return $('.openingText').css({ 'margin-top': (currentScrollPosition / 4) + "px", 'opacity': 1 - (currentScrollPosition / 250) }); }; })(this); $(document).ready((function(_this) { return function() { $(window).scroll(function() { return parallaxScroll(); }); return $(document).scroll(function() { var bottomOfOpening, compareWindowHeight, header, sideBar, windowHeight, windowTop; windowTop = $(window).scrollTop(); bottomOfOpening = $('.opening').position().top + $('.opening').height(); header = $('.header'); sideBar = $('.sideBar'); windowHeight = $(window).height(); compareWindowHeight = (windowHeight - 70) + "px"; if (bottomOfOpening > windowTop) { return header.css({ 'position': 'absolute', 'top': '100%', 'left': '0' }); } else { return header.css({ 'position': 'fixed', 'top': '0', 'left': '0' }); } }); }; })(this));
}).call(this);
Parallax Type Thing - Script Codes
Parallax Type Thing - Script Codes
Home Page Home
Developer Chris Maki
Username chrisMaki
Uploaded August 12, 2022
Rating 3
Size 7,000 Kb
Views 36,432
Do you need developer help for Parallax Type Thing?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Chris Maki (chrisMaki) Script Codes
Create amazing sales emails with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!