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.
6 odpowiedzi
+ 9
maybe @keyframes rule🤔
+ 4
yes it's possible
box.style.transform="rotate(40deg)";
+ 2
element.style.attributes
example:
box.style.position='absolute'
+ 2
but if i animate it from 0 to 360deg rotation how can i make it up in JavaScript, onclick attribute.
+ 1
element.onclick='element.style.transform="rotate(360)"'
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