# How to rotate an image on scroll?

**URL:** <https://forum.wixstudio.com/t/how-to-rotate-an-image-on-scroll/27155>\
**Category:** Ask the community\
**Tags:** code, question\
**Created:** [April 14, 2020, 8:27am UTC](https://forum.wixstudio.com/t/how-to-rotate-an-image-on-scroll/27155 "2020-04-14T08:27:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kelnguyen4](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/kelnguyen4/32/18242_2.png) [@kelnguyen4](https://forum.wixstudio.com/u/kelnguyen4)\
**Post date:** [April 14, 2020, 8:27am UTC](https://forum.wixstudio.com/t/how-to-rotate-an-image-on-scroll/27155/1 "2020-04-14T08:27:44Z")

</div>

I am attempting to have a wheel of text rotate when the user scrolls? How do I achieve this?

---

<div class="post-metadata">

**Author:** ![yevheniias](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/yevheniias/32/3202_2.png) [@yevheniias](https://forum.wixstudio.com/u/yevheniias)\
**Post date:** [April 14, 2020, 11:10am UTC](https://forum.wixstudio.com/t/how-to-rotate-an-image-on-scroll/27155/2 "2020-04-14T11:10:05Z")

</div>

Hey!  
Check out these links on animations:

- [https://www.wix.com/corvid/example/image-and-text-animation](https://www.wix.com/corvid/example/image-and-text-animation)

- [https://www.wix.com/corvid/forum/corvid-tips-and-updates/example-wix-animations](https://www.wix.com/corvid/forum/corvid-tips-and-updates/example-wix-animations)

- [https://www.wix.com/corvid/reference/wix-animations.html#timeline](https://www.wix.com/corvid/reference/wix-animations.html#timeline)

---

<div class="post-metadata">

**Author:** ![kelnguyen4](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/kelnguyen4/32/18242_2.png) [@kelnguyen4](https://forum.wixstudio.com/u/kelnguyen4)\
**Post date:** [April 14, 2020, 5:25pm UTC](https://forum.wixstudio.com/t/how-to-rotate-an-image-on-scroll/27155/3 "2020-04-14T17:25:22Z")

</div>

Thanks for the help Yevheniia but is there a way to animate when a user scrolls in Wix instead of having it on a timeline?

---

<div class="post-metadata">

**Author:** ![givemeawhisky](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/givemeawhisky/32/5383_2.png) [@givemeawhisky](https://forum.wixstudio.com/u/givemeawhisky)\
**Post date:** [April 14, 2020, 8:51pm UTC](https://forum.wixstudio.com/t/how-to-rotate-an-image-on-scroll/27155/4 "2020-04-14T20:51:52Z")

</div>

Using the Wix Animation API would be your best choice here.

However, for a simple workaround you can simply have this text pinned to your screen and then add an anchor or element with a onViewportEnter or onViewportLeave event handler function.

So that when the viewport function runs it starts the text spinning simply using the spin in the [effect options](https://www.wix.com/corvid/reference/$w.EffectOptions.html#SpinEffectOptions) .

It doesn’t have to be pinned, that was just an idea for having it go up and down the page with the scroll.

If you wanted to do more with the text itself then you would have to look into using your own html/css/js code and using a html iFrame with your animated text inside.
