JSFiddle - React, Tailwind, and code Playground
HTML
<body>
<div id="project_presentation">
<section id="img1" data-type="background" data-speed="19" style="background: url(http://www.vincentleroux.fr/assets/img/projects/product/jorislaarman1.jpg) 0 no-repeat fixed;
min-height: 1000px; margin: 0 auto; width: 100%; max-width: 1920px; background-size : cover;">
</section>
<section id="img1" data-type="background" data-speed="19" style="background: url(http://www.vincentleroux.fr/assets/img/projects/product/jorislaarman2.jpg) 0 no-repeat fixed;
min-height: 1000px; margin: 0 auto; width: 100%; max-width: 1920px; box-shadow : 0 0 30px #292929; background-size : cover;">
</section>
<section id="img1" data-type="background" data-speed="19" style="background: url(http://www.vincentleroux.fr/assets/img/projects/product/jorislaarman3.jpg) 0 no-repeat fixed;
min-height: 1000px; margin: 0 auto; width: 100%; max-width: 1920px; box-shadow : 0 0 30px #292929; background-size : cover;">
</section>
<section id="img1" data-type="background" data-speed="19" style="background: url(http://www.vincentleroux.fr/assets/img/projects/product/jorislaarman4.jpg) 0 no-repeat fixed;
min-height: 1000px; margin: 0 auto; width: 100%; max-width: 1920px; box-shadow : 0 0 30px #292929; background-size : cover;">
</section>
<section id="img1" data-type="background" data-speed="19" style="background: url(http://www.vincentleroux.fr/assets/img/projects/product/jorislaarman5.jpg) 0 no-repeat fixed;
min-height: 1000px; margin: 0 auto; width: 100%; max-width: 1920px; box-shadow : 0 0 30px #292929; background-size : cover;">
</section>
<section id="img1" data-type="background" data-speed="19" style="background: url(http://www.vincentleroux.fr/assets/img/projects/product/jorislaarman6.jpg) 0 no-repeat fixed;
min-height: 1000px; margin: 0 auto; width: 100%; max-width: 1920px; box-shadow : 0 0 30px #292929; background-size : cover;">
</section>
<section id="img1" data-type="background" data-speed="19"...
CSS
@charset "utf-8";
/* CSS Document */
/* CSS RESET */
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
/* CSS RESET END */
#project_presentation
{
margin-bottom : 65px;
}
#project_presentation_tc
{
position : fixed;
bottom : 0;
background-color : #f4f3d8;
width : 100%;
box-shadow : 0 0 30px #292929;
}
#project_presentation_tc p
{
width : 1000px;
margin : auto;
font-family : 'Dosis', sans-serif;
font-size : 1.4em;
text-align : center;
margin-top : 10px;
margin-bottom : 10px;
}
JavaScript
$(document).ready(function(){
var $window = $(window);
$('section[data-type="background"]').each(function(){
var $bgobj = $(this); // assigning the object
$(window).scroll(function() {
var yPos = -($window.scrollTop() / $bgobj.data('speed'));
// Put together our final background position
var coords = '50% '+ yPos + 'px';
// Move the background
$bgobj.css({ backgroundPosition: coords });
});
});
});