[SOLVED]How to rotate up-down/left-right? | SoloLearn: Learn to code for FREE!


[SOLVED]How to rotate up-down/left-right?

1.how to rotate/revolve this 🐈 in all corner of the screen...? https://code.sololearn.com/WfoD8lQt5cGN/?ref=app https://code.sololearn.com/WlnVtRsK246Z/?ref=app

11/21/2020 2:22:36 PM


20 Answers

New Answer


ᕙ(⇀‸↼‶)ᕗ https://code.sololearn.com/WA4VlMKGw0vY/?ref=app


Ozlem Guldurdnnb please do not spam question and answer threads, posts, or codes. Please remove. Thanks and happy coding. Please follow the guidelines https://www.sololearn.com/discuss/1316935/?ref=app


𝖀𝖏𝖏𝖆𝖜𝖆𝖑 𝕾𝖍𝖆𝖗𝖒𝖆 just use the code I wrote above: https://code.sololearn.com/WB467voDIjRw/?ref=app


Zeke Williams Hello,thanks for answering,Can you show the demo code please...


Zeke Williams thank you look this code.... https://code.sololearn.com/Wp15eBo53I92/?ref=app Why the cat hides when going top...please set this..


Zeke Williams can you modify your answer/code i want to revolve the cat to whole document, like this, https://www.dropbox.com/s/wwi2r99j7ld4w5v/IMG_20201121_232407.png?dl=0 please sir help again..


𝖀𝖏𝖏𝖆𝖜𝖆𝖑 𝕾𝖍𝖆𝖗𝖒𝖆 When you take the sine or cosine of a number, the resulting value can be negative.


I think what you're looking for is the transform property. element.style.transform You can use this property to do all sorts of things, but what I think you are looking for is the rotate function. elem.style.transform = "rotate(20deg)"; Then you can use a variable that you change over time to animate the rotation. "rotate(" + zRot + "deg)";


𝖀𝖏𝖏𝖆𝖜𝖆𝖑 𝕾𝖍𝖆𝖗𝖒𝖆 no, I can't do it for you, but I can tell you that all you need to do is adjust your values inside the cosine and sin calculations.


Zeke Williams okk no problem,i will try do it myself...


Zeke Williams okk thank you so much sir...◖⚆ᴥ⚆◗


https://www.sololearn.com/learn/HTML/2214/?ref=app Should help.


Well u can rotate by using CSS only bro, one thing u need to crop the image first it has some white background Like this: https://code.sololearn.com/W3jy3z53U778/?ref=app


𝖀𝖏𝖏𝖆𝖜𝖆𝖑 𝕾𝖍𝖆𝖗𝖒𝖆 I actually like Sick L̲̅i̲̅n̲̅e̲̅ B̶r̶o̶🌡️ [TheBloodCoders] 's suggestion with the CSS. It would be really easy to set up a keyframe animation that has four steps: top left corner, top right corner, bottom right corner, bottom left corner. Here's an example of the first one: @keyframes travelCat { 0% { top: 50px; left: 50px; transform: rotate(0deg); } } It will need an absolute position for this to work well. And the parent container needs to be the width and height of the screen.


Sick L̲̅i̲̅n̲̅e̲̅ B̶r̶o̶🌡️ [TheBloodCoders] Thank u so much for your answer and code...But i want to revolve the cat to whole document, like this, https://www.dropbox.com/s/wwi2r99j7ld4w5v/IMG_20201121_232407.png?dl=0


Thank you so much Zeke Williams Sick L̲̅i̲̅n̲̅e̲̅ B̶r̶o̶🌡️ [TheBloodCoders] Look at my code.... Why this css property not working?... Display:grid; Place-items:center; how to set "L O A D I N G" in center of the screen? https://code.sololearn.com/WlnVtRsK246Z/?ref=app