How to rotate an object clockwise?

How to rotate an object clockwise (without canvas, css3, etc.)?

See my sample code

Just help me fix my formula.

+3
source share
2 answers

You cannot do this without CSS, but your sample code uses CSS to translate: you change the CSS properties using JavaScript to change the style properties of the div.

Try something like:

div.style['-webkit-transform'] = 'rotate(' + angle + 'deg)';

To set the angle, suppose you are working with a Webkit browser.

+1
source

There are two ways you can rotate your object, both have their back spins.

1) php . GD.

, , rotate.php? image = my_image_name & angle = 30, .

, .

2) . .

, . , 5 , 72 .

, div. divs ofcourse.

+1

Source: https://habr.com/ru/post/1778384/


All Articles