"parallax"
Bootstrap 3.0.0 Snippet by Glgcoder

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <!DOCTYPE html><html class=''> <head><script src='//production-assets.codepen.io/assets/editor/live/console_runner-079c09a0e3b9ff743e39ee2d5637b9216b3545af0de366d4b9aad9dc87e26bfd.js'></script><script src='//production-assets.codepen.io/assets/editor/live/events_runner-73716630c22bbc8cff4bd0f07b135f00a0bdc5d14629260c3ec49e5606f98fdd.js'></script><script src='//production-assets.codepen.io/assets/editor/live/css_live_reload_init-2c0dc5167d60a5af3ee189d570b1835129687ea2a61bee3513dee3a50c115a77.js'></script><meta charset='UTF-8'><meta name="robots" content="noindex"><link rel="shortcut icon" type="image/x-icon" href="//production-assets.codepen.io/assets/favicon/favicon-8ea04875e70c4b0bb41da869e81236e54394d63638a1ef12fa558a4a835f1164.ico" /><link rel="mask-icon" type="" href="//production-assets.codepen.io/assets/favicon/logo-pin-f2d2b6d2c61838f7e76325261b7195c27224080bc099486ddd6dccb469b8e8e6.svg" color="#111" /><link rel="canonical" href="https://codepen.io/MoorLex/pen/RWOeKv?depth=everything&limit=all&order=popularity&page=5&q=parallax&show_forks=false" /> <link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css'><link rel='stylesheet prefetch' href='https://fonts.googleapis.com/css?family=Roboto:400,100,700,500'><link rel='stylesheet prefetch' href='//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css'> <style class="cp-pen-styles">* { box-sizing: border-box; } body { font-family: 'Roboto'; } .layout { display: block; position: relative; background: #fff; height: 100vh; } /* header */ header { height: 100vh; position: relative; overflow: hidden; background-size: cover; background: rgba(0, 0, 0, 0.7); } header .content { position: relative; display: block; color: #FFFFFF; top: 50%; left: 50%; text-align: center; transform: translate(-50%, -50%); text-shadow: 0px 0px 5px #000000; } header .content h1 { font-size: 3em; font-weight: normal; } header .content h3 { font-size: 1.5em; font-weight: lighter; } .bg { display: block; position: fixed; width: 100vw; height: 100vh; top: 0; left: 0; background: url('http://cs627531.vk.me/v627531615/d23c/xqkB4APcT4c.jpg') center no-repeat; background-size: cover; -moz-transition: 0.1s; -o-transition: 0.1s; -webkit-transition: 0.1s; transition: 0.1s; z-index: -1; } </style></head><body> <div class="bg"></div> <header> <div class="content"> <h1>Parallax Header</h1> <h3>simple and beautiful</h3> </div> </header> <div class="layout"></div> <script src='//production-assets.codepen.io/assets/common/stopExecutionOnTimeout-b2a7b3fe212eaa732349046d8416e00a9dec26eb7fd347590fbced3ab38af52e.js'></script><script src='//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script><script src='https://codepen.io/MoorLex/pen/MmBwXe.js'></script> <script >//PARALLAX $(window).scroll(function(){ parallax(); }); function parallax(){ var scrolled = $(window).scrollTop(); $('.bg').css('top',-(scrolled*0.1)+'px'); $('header .content').css('top',50+(scrolled*0.1)+'%'); $('header .content').css('opacity',1-(scrolled*0.01)/10); $('header .content').css('opacity',1-(scrolled*0.01)/10); }; //# sourceURL=pen.js </script> </body></html>

Related: See More


Questions / Comments: