parallax header
parent
462ae8d0d4
commit
d12144822b
Binary file not shown.
Before Width: | Height: | Size: 279 KiB After Width: | Height: | Size: 173 KiB |
|
@ -26,6 +26,12 @@ function scroll_effect() {
|
|||
// Get the scroll position of the page
|
||||
scrollPos = jQuery(this).scrollTop();
|
||||
// Fade out the banner text
|
||||
if (scrollPos < 250)
|
||||
{
|
||||
jQuery('.img-1').css({
|
||||
'background-position': "0 -"+(scrollPos*2)+"px"
|
||||
});
|
||||
}
|
||||
jQuery('.carousel-caption').css({
|
||||
'margin-top' : -(scrollPos/3)+"px",
|
||||
'opacity' : 1-(scrollPos/300)
|
||||
|
|
Loading…
Reference in New Issue