Jump to content
Search Community

Scroll down effects

Elia test
Moderator Tag

Recommended Posts

Hi, i am a new member and i need help. I found a script that interests me but I should edit it. I have attached the code, delete the comment to understand what it is. I should adapt the Image to the container that is climbing, so as to remain attached both vertically and horizontally to the center of the container. Could you help me? I tried to adapt it manually but then with larger screens it becomes unmanageable.
If it helps I'm using Bootstrap.

See the Pen GRmbreE by edalbe (@edalbe) on CodePen

Link to comment
Share on other sites

@Elia i think you need to change this:
 

.scaleDown {
  width: 120vw;
  height: 120vh;
  position: absolute;
  top: 50%;
  left: 50%;
  background-color: red;
  transform-origin: 50% 50%;
}

for this

.scaleDown {
  width: 100vw;
  height: 100vh;
  position: absolute;
  top: 50%;
  left: 50%;
  background-color: red;
  transform-origin: 50% 50%;
}


I updated the Codepen so you can check if it is ok now 😉

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...