Rotate an Element

I have create a line in html. And I have write a script to drag that line. Now I have to rotate that line by mouse move. how to do that. Please help me

I found this if that’s what you’re looking for to solve your problem:


Then there is a function in CSS to rotate:

I hope they can help you :smiley:

Thank you for your kind reply :blush: . It will help to me. But if here is an option to rotate based on mouse rotate, that will be great to me.

Try this:

Thank you So much @camcode