How to fix the position of the square? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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

1st May 2019, 10:02 PM
Robin R.
Robin R. - avatar
3 Answers
+ 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
2nd May 2019, 1:19 AM
Decimis † 𝕯𝖊𝖈𝖎𝖒𝖎𝖘
Decimis † 𝕯𝖊𝖈𝖎𝖒𝖎𝖘 - avatar
+ 2
Tried that they both rotate some way..strange, I will play arround with it some more later on
1st May 2019, 10:33 PM
Robin R.
Robin R. - avatar
+ 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.
1st May 2019, 10:29 PM
Decimis † 𝕯𝖊𝖈𝖎𝖒𝖎𝖘
Decimis † 𝕯𝖊𝖈𝖎𝖒𝖎𝖘 - avatar