0

How to control over Css using JavaScript?

suppose i have div box and i want to rotate or make its size increasing gradually or in other word is possible to animate the css property's cause i have never used it . please give some example with explanation.

11th Mar 2018, 6:53 AM
🦋FEATHER🦋
🦋FEATHER🦋 - avatar
6 Réponses
+ 9
maybe @keyframes rule🤔
11th Mar 2018, 6:59 AM
\__(° = °)__/
+ 4
yes it's possible box.style.transform="rotate(40deg)";
11th Mar 2018, 7:16 AM
᠌᠌Code X
᠌᠌Code X - avatar
+ 2
element.style.attributes example: box.style.position='absolute'
11th Mar 2018, 7:08 AM
Blizz
Blizz - avatar
+ 2
but if i animate it from 0 to 360deg rotation how can i make it up in JavaScript, onclick attribute.
11th Mar 2018, 7:19 AM
🦋FEATHER🦋
🦋FEATHER🦋 - avatar
+ 1
element.onclick='element.style.transform="rotate(360)"'
11th Mar 2018, 7:22 AM
Blizz
Blizz - avatar
0
@Blizz i know what you have given the example but my question is it possible animate like moving of and div element or rotating or what ever we can do in css is it possible on JavaScript. if Yes how
11th Mar 2018, 7:12 AM
🦋FEATHER🦋
🦋FEATHER🦋 - avatar