Skip to content

Instantly share code, notes, and snippets.

@BMU-Verlag
Last active July 30, 2019 13:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BMU-Verlag/686c5ec6a0e505604b7a582d4f07829b to your computer and use it in GitHub Desktop.
Save BMU-Verlag/686c5ec6a0e505604b7a582d4f07829b to your computer and use it in GitHub Desktop.
<script>
var rotateDegree = 0;
function rotateRect() {
rotateDegree += 5;
if (rotateDegree >= 360) rotateDegree = 0;
var rectangle = document.getElementById("rectID");
rectangle.setAttribute("transform", "rotate("+rotateDegree+",50,50)");
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment