parallax

(CSS) Make a background image scroll slower than everything else

北战南征 提交于 2019-11-30 06:14:44
问题 here is is my CSS code for the body: body { padding: 0; margin: 0; background-image: url("../images/background.jpg"); background-repeat: no-repeat; background-color: grey; background-size: 100%; } What I want to do is make it so that the image scrolls slower than everything else on the page to make a simple parallax effect. I've looked online and all of the examples I've seen are much more complicated than what I want. 回答1: I stumbled upon this looking for more flexibility in my parallax

How to do the parallax effect similar to tokiolab.it? [closed]

醉酒当歌 提交于 2019-11-30 02:32:06
I have been reading a lot about jQuery parallax and I just don't get it at all. I want to do the same as this site: http://www.tokiolab.it/#/ As you can see the first page is an animation which is really easy but when you scroll the next page starts covering part of the first one. Can someone help me a bit, I know you need to use z-index but how do you achieve that effect - it seems to not be that difficult, maybe a fixed background or a fixed div, any ideas? Thanks alot! Thanks in advance! 来源: https://stackoverflow.com/questions/10143340/how-to-do-the-parallax-effect-similar-to-tokiolab-it

Horizontal scrolling with parallax background for ios

孤街醉人 提交于 2019-11-30 02:08:08
I'm facing a challenge of creating an introduction view, something like the "Cleanio" app ( https://itunes.apple.com/fr/app/cleanio-pressing-la-demande/id885856031?mt=8 ). Here is how it looks like: So, the background and the overlay are moving independently and not in the same speed. Does anyone have a start point how to realize that? Yep. What you need is two UIScrollView s. These should both be subviews of the main view (not contained in each other. The bottom one has your image in it and the top one has the content. Call them imageScrollView and contentScrollView . Become the delegate of

Parallax view scrolling (Yahoo weather like)

久未见 提交于 2019-11-30 01:02:07
This is not strictly a programming question but more "how to accomplish this" question. I am curious (and working on an app that will probably require this) how is left-right parallax scrolling implemented. To know exactly what I mean check the Yahoo Weather app (it's free - no worries there). Are they using just one view controller or a separate controller for each view that is shown there? What is the easiest way to implement this? I have found this topic here which kinda explains it a bit but when are they getting information from their servers? Is it when the views are changed or at the

jQuery page scroll event logic — how to throttle

与世无争的帅哥 提交于 2019-11-29 18:10:37
I have some jQuery listeners setup as follows: $(document).scroll(function() { if( $(this).scrollTop() < change1) { updateBarChart('valuem', 'opencomparison'); } else if ( $(this).scrollTop() > change1 && $(this).scrollTop() < change2) { updateBarChart('valuef', 'opencomparison'); } else if ($(this).scrollTop() > change2) { updateBarChart('valuem', 'remove') //updateSteamChart('','steam') } }); Straightforward enough. Some charts are updated when scrolling changes. My issue is, this is sending too many function updates. I'd like if there were a way to throttle the .scroll(function() {}) That

CSS Parallax working beautifully in Chrome but not Firefox

痴心易碎 提交于 2019-11-29 16:05:38
The website is temporarily hosted here . I used the Pure CSS Parallax example here . All the HTML, CSS and JavaScript should be viewable under View Page Source. The parallax effect works beautifully in Chrome. In Firefox, the effect works but background images start to disappear when I scroll past a certain point! You can checkout http://caniuse.com/ it shows you what every browser supports or not. Every browsers is different as you know, there might be elements on Edge and FF that might not be supported like they are on Chrome. 来源: https://stackoverflow.com/questions/37146084/css-parallax

Is there a way to make parallax work within a DIV

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-29 04:12:20
问题 May be completely barking up the wrong tree but can you make a parallax scrolling image using a div background-image element? What I want to happen is I currently have some DIVs with images with a text effect rollover but I as I'm using parallax in a background image I want to keep the 3D theme with all the sites images. EDIT: For example, is it possible to make the blue boxes on this page: www.parkhallmanor.co.uk/new Scroll separate images using a parallax effect? 回答1: Yes, that's possible.

How to do the parallax effect similar to tokiolab.it? [closed]

笑着哭i 提交于 2019-11-28 23:29:32
问题 I have been reading a lot about jQuery parallax and I just don't get it at all. I want to do the same as this site: http://www.tokiolab.it/#/ As you can see the first page is an animation which is really easy but when you scroll the next page starts covering part of the first one. Can someone help me a bit, I know you need to use z-index but how do you achieve that effect - it seems to not be that difficult, maybe a fixed background or a fixed div, any ideas? Thanks alot! Thanks in advance!

Move the background image on mouse over (Single Parallax)

China☆狼群 提交于 2019-11-28 20:48:28
I would like to make the background image move slightly on the X and Y axis when the mouse is in the "landing-content" DIV, it should move with the movement of the mouse. it should move inverse. EG. Mouse move down, "landing-content" image moves up. HTML <div id="landing-content"> <section class="slider"> <img src="http://i.imgur.com/fVWomWz.png"></img> </section> </div> CSS #landing-content { overflow: hidden; background-image: url(http://i.imgur.com/F2FPRMd.jpg); width: 100%; background-size: cover; background-repeat: no-repeat; max-height: 500px; border-bottom: solid; border-bottom-color:

Parallax effect with UIScrollView subviews

流过昼夜 提交于 2019-11-28 19:43:21
I'm trying to create a Parallax effect on a UIView inside a UIScrollView. The effect seems to work, but not so well. First i add two UIView sub-views to a UIScrollView and set the UIScrollViews contentSize. The Views sum up and create a contentSize of {320, 1000}. Then I implemented the following in scrollViewDidScroll: - (void)scrollViewDidScroll:(UIScrollView *)scrollView { CGFloat offsetY = scrollView.contentOffset.y; CGFloat percentage = offsetY / scrollView.contentSize.height; NSLog(@"percent = %f", percentage); if (offsetY < 0) { firstView.center = CGPointMake(firstView.center.x,