Animation by changing both pixelTop and pixelLeft (IE) : Text : Animation JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Animation » Text »

 

Animation by changing both pixelTop and pixelLeft (IE)

















<html>
<head>
<title>A Simple Page</title>
<script language="JavaScript">
<!--
function moveTxt()
{
    if (ani1.style.pixelTop < 500)
    {
        ani1.style.pixelTop += 2;
        ani1.style.pixelLeft += 2;
        setTimeout("moveTxt()"50);
    }
}
//  -->
</script>
</head>
<body onLoad="moveTxt()">
<div id="ani1" style="position:absolute;left:10;top:10">
Text ... on the go!
</div>
</body>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Animation
» Text