Created
March 7, 2022 07:01
-
-
Save mattn/27bad581e37cdd5be964e21e2a7ab8c4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
#container { | |
display: inline-block; | |
margin-left: 200px; | |
margin-top: 200px; | |
} | |
#container img { | |
margin: 50px; | |
} | |
</style> | |
<script> | |
window.addEventListener('DOMContentLoaded', function() { | |
let d1 = 0, d2 = 0; | |
setInterval(function() { | |
d1 += 10; | |
d2 += 10; | |
document.getElementById("img1").style.transform = "rotate(" + d1 + "deg)"; | |
document.getElementById("img2").style.transform = "rotate(" + d2 + "deg)"; | |
}, 10); | |
}) | |
</script> | |
<div id="container"> | |
<img id="img1" src="ukrain.png"> | |
<img id="img2" src="ukrain.png"> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment