+ 2
How to fix the position of the square?
So the square rotates the circle but I wan't it to stay fix, and not rotate also, just rotate around the path. Any ideas what parameter(s) have to be changed? I used some of this code to get this result, in this example the Square doesn't rotate itself. https://codepen.io/ZachSaucier/pen/rsvgK Thx https://code.sololearn.com/Wo1CvPLv4i13/?ref=app
3 Respostas
+ 1
I played around with it more myself also and got it to work.
I commented all the changes that I made to do it. One in HTML and the a few in CSS.
https://code.sololearn.com/WZTSzNWfufIg/?ref=app
+ 2
Tried that they both rotate some way..strange, I will play arround with it some more later on
+ 1
What he is doing in that codepen code is using two boxes on top of each other. One, invisible box, rotates around the circle while the other is actually rotating backwards at the same speed that it is going around making it look like it is not rotating.
Add a background color to the top div of the codepen code and you will see what he is doing.