"parallax effect"
Bootstrap 3.3.0 Snippet by selvasekhar

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.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 ----------> <div id='container'> <div id="group1"> <div class="background"> <center>I'm an element far away.</center> </div> <div class="foreground"> <center>I'm an element close by.</center> </div> </div> </div>
div { box-sizing: border-box; } #container { position: fixed; top: 0; left: 0; right: 0; bottom: 0; perspective: 1px; overflow-x: hidden; overflow-y: scroll; } #group1 { height: 1000px; position: relative; transform-style: preserve-3d; font-size: 20px; } .background { /*effect the animation effect */ transform: translateZ(-1px); height: 500px; width: 100%; position: absolute; top: 0; background: #FF8A8A; padding-top: 100px; } .foreground { position: absolute; top: 500px; height: 500px; width: 100%; background: #23819C; opacity: 0.8; }

Related: See More


Questions / Comments: