+ 1
[SOLVED] How to make transition only rotate? please help
ex. I have translate and rotate, I need to animate rotate but not animate translate transition: transform 1s ease; (animates translate too) transition: rotate 1s ease; (not work) HOW not to animate the translate, but to animate the rotate?
6 Antworten
+ 2
transition: transform 1s ease;
tansform: rotate(90deg);
trasition: ;
transform: translate(10px,10px);
+ 4
If the element is hovered
#element:hover{
transform:rotate(20deg);
}
#element{
transition:1s ease;
}
Please note the # is optional likewise the 20deg
+ 2
yes but it animates translate(move)
+ 2
How?
+ 1
I want to use this in my game, and there the player moves and turns. I need to make it move sharply, but turn smoothly
https://code.sololearn.com/Wf9YP1l6u4jY/?ref=app
+ 1
It looks good now but still needs some edit
https://code.sololearn.com/W85vl5pMuMLA/?ref=app