このエラーが発生しています Uncaught TypeError: Cannot read property 'style' of null in the following code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sem título</title>
<style>
#div{
width:100px;
height:100px;
background:#999;
-webkit-transform:none;
}
</style>
<script type="text/javascript">
deg1=0;
deg2=0;
function animando(){
deg1++;
deg2++;
quadrado = document.getElementById('div');
quadrado.style.webkitTransform = "rotate(-2deg)";
}
setInterval(animando(),100);
</script>
</head>
<body>
<div id="div">
</div>
</body>
</html>