Skip to main content

Animations Start/End

We can specify start of an animation in the start key of the ScrollTrigger object.

{
start: `${element_position} ${viewport_position}`;
}
  • The first value indicates the position of the element at which animation starts.

  • The second value is for the position of the viewport at which animation starts.

Similarly, the value of the end key can be defined.

{
end: `${element_position} ${viewport_position}`;
}