How to rotate image when scrolling using CSS transform?

后端 未结 5 1066
忘掉有多难
忘掉有多难 2021-01-01 06:01

I\'m not sure how to use using jQuery, but has a CSS3 property: transform: rotate

it could be used along with jQuery?

transform:rotate;
-ms-transform         


        
5条回答
  •  隐瞒了意图╮
    2021-01-01 07:03

    You can achieve the same result, in a more simple way using DOM javascript, instead of jQuery. Give your image an id, and add the following javascript:

    
    

    Where it says "window.pageYOffset/5", you can lower the number (5) for a faster rotation, or make it higher for a slower rotation.

提交回复
热议问题