object
options.rotate
specifies the rotation elements have prior to being revealed.
{
rotate: {
x: 0,
y: 0,
z: 0
}
}
Key values should be a number
describing an angle in degrees.
CSS Transforms are preserved. For example, if your element already has 45° of Z‑rotation and you specify options.rotate
{ z: 20 }
, your element will initialize with 65° of Z‑rotation and animate back to the computed value of 45° when revealed.
ScrollReveal().reveal('.flip', {
rotate: {
x: 20,
z: 20
}
});