Leonardo Sotelo

Generation

generate functionWed, 14 Jun 2023

funtion that generate a red div and rotate it constantly dynamically

function change() { var b = document.getElementById("div1"); b.style.transform = "rotate(30deg)"; b.style.transitionDuration = "3s"; setTimeout(change2, 3000); } function change2() { var b = document.getElementById("div1"); b.style.transform = "rotate(0deg)"; b.style.transitionDuration = "3s"; setTimeout(change, 3000); }

Javascript
Generate More

Want to kickstart your project?Use the new AI Studio to create your code