Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8535093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:21:07+00:00 2026-06-11T10:21:07+00:00

First post on SO so far :) I’m creating a parallax website combining css3

  • 0

First post on SO so far 🙂

I’m creating a parallax website combining css3 + javascript.

I followed this tutorial and I have to say that it gave me quite a grasp on the subject.

I was just wondering 2 things:

  1. How do I translate the movement on the X axis?
  2. Most Important: How can i combine users’ scrolling with animations?

I’ve seen there is plenty of plugins out there, but I’d rather develop a solution myself without getting the code too heavy and complicated. Could you point me out some good resource, which will enlighten me on this technique?

Thank you guys!

EDITED on 17/09/12 at 14.14 (+1 GTM TIME)
In case someone would be interested, that should be the idea-code by which we would do the trick:

$(document).ready(function() {
$(‘section[data-type=”example”]’).scroll(function() {

// If the user scroll as much as we need, in this instance 750px
if (scrollTop() > '750px') {
  // switch its class from ".animation" to ".animated" 
  $(".animation").toggleClass("animated"); 
}

});
});

CSS Classes would be:
.animation {
width: 300px;
height: 300px:
-webkit-transition: width 2s ease, height 2s ease;
-moz-transition: width 2s ease, height 2s ease;
-o-transition: width 2s ease, height 2s ease;
-ms-transition: width 2s ease, height 2s ease; transition: width 2s ease, height 2s ease; }

.animated { width: 400px; height: 400px; }

As we see, in “.animation” we would find the initial size and the animation, and in “.animated” we’re going to print what we want to achieve.

This has been created thanks to the hints provided by @jfriend00. Unfortunately I havn’t had the possibility to try it yet, so feel free to improve it. I wrote it here because it seems like someone is interested to this topic, and previously I posted it in a comment making it unreadable 🙂

Also, Jfriend00 told that .scrollTop() is a JQuery Method, not a plain function. How do you think it could be improved using plain JS?

Thanks in advance and sorry for my grammar error and for the noobness; I’m not English Native and I’m quite new with programming 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T10:21:08+00:00Added an answer on June 11, 2026 at 10:21 am

    From your comment:

    Let’s say that for example, I want to combine the users’ scroll to a
    transitional effect. So i.e. once the user has scrolled 750px, I want
    an object to appear with a fade transition. How do I link the
    scrolling factor with the animation?

    This is one way to approach that specific example:

    1. You would register an event listener for the scroll event.
    2. In the scroll event handler, you would examine the current scroll position and decide if you wanted to take action (e.g. scrollTop is more than 750px).
    3. The easiest way to trigger a CSS3 animation is to add a class name to your object. If the object has CSS assigned to it for that new class and the object is configured for CSS transitions on any of the properties that are changed by adding the class name to the object, then a CSS3 animation will start when the class is added.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my first post and I my first experience with jquery. I have
This is my first post on this rather spiffing website so go easy on
This is my first post. I have a function that asks for the number
Huge fan of this website, but it's my first post! I've got an array
this is my first post on this forum. So hi! I have a problem.
This is my first post here so kindly pardon any mistakes that I have.
My first post here :) I have a summer job doing a bit of
My first post here, so i hope this is the right area. I am
This is my first post in this forum, so please, be patient with me.
This is my first post on stackoverflow, so please excuse me if my question

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.