-
AuthorPosts
-
December 2, 2014 at 11:30 pm #203275
I have made a custom module and have added a background image
here is my code:
.parentdiv {
background-image: url(“http://creativeharmony.co.uk/CC/images/joomlart/church/social-media.jpg”);
background-size: cover;
background-position: 50% -55px;
background-repeat: no-repeat no-repeat;}
How do i make the background have a parallax scrolling effect with the image?
TomC ModeratorTomC
- Join date:
- October 2014
- Posts:
- 14077
- Downloads:
- 58
- Uploads:
- 137
- Thanks:
- 948
- Thanked:
- 3155 times in 2495 posts
December 2, 2014 at 11:35 pm #557448Perhaps one (or more) of the following resources may be helpful . . . .
http://davidwalsh.name/parallax
https://ihatetomatoes.net/simple-parallax-scrolling-tutorial/
http://callmenick.com/2014/07/15/simple-parallax-scrolling-effect/
http://code.tutsplus.com/tutorials/a-simple-parallax-scrolling-technique–net-27641
http://cdn.tutsplus.com/net/uploads/legacy/2138_SimpleParallax/Demo/index.html
1 user says Thank You to TomC for this useful post
December 3, 2014 at 12:05 am #557451HI Tom thanks for the quick response and the links
however, in the Uber Demo if you look at the Blocks CTA style-3 that already has a parallax image background.
so I was wondering if there was an easier way to implement this?
otherwise the easy alternative for me would be to install a third party parallax module which I already have
chavan Friendchavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
December 3, 2014 at 2:28 am #557468Try this
.parentdiv {
background-image: url("http://creativeharmony.co.uk/CC/images/joomlart/church/social-media.jpg");
background-size: cover;
background-position: 50% -55px;
background-repeat: no-repeat no-repeat;
background-attachment:fixed;
}2 users say Thank You to chavan for this useful post
December 3, 2014 at 2:38 am #557471wow! amazing worked perfectly
🙂
pepperstreet Friendpepperstreet
- Join date:
- April 2011
- Posts:
- 55
- Downloads:
- 223
- Uploads:
- 7
- Thanks:
- 21
- Thanked:
- 4 times in 1 posts
August 3, 2015 at 1:19 am #647188Hello, just wanted to add my thoughts and investigations about CTA Style3 background FX.
As far as I know, the background DIV has the special CSS class: .bg-image
This class is used in the related UBER javascript. So, to get the real parallax effect which modifies the y-Position while scrolling, you have to apply this CSS class. Otherwise you stay with a simple fixed background. I assume, the integrated mobile device check disables the effect anyway.BTW, this is the Script in action:
http://www.ianlunn.co.uk/blog/code-tutorials/recreate-nikebetterworld-parallax/1 user says Thank You to pepperstreet for this useful post
-
AuthorPosts
This topic contains 6 replies, has 4 voices, and was last updated by pepperstreet 9 years, 3 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum