Otra alternativa:
Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" <!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=iso-8859-1" />
<title>test</title>
<style>
#externa{ width:600px; border:1px dashed #000; position:relative; overflow:hidden; height:15px}
#interna{ position:absolute; font-size:10px; font-family:Verdana, Arial, Helvetica, sans-serif; line-height:15px;}
</style>
<script>
function t(id){return document.getElementById(id);}
function getStyle(id,w3cProp,IEProp){
if(window.getComputedStyle){
return document.defaultView.getComputedStyle(t(id),null).getPropertyValue(w3cProp);
}else if(t(id).currentStyle){
return t(id).currentStyle[IEProp];
}else{
alert('No se encontró el estilo');
}
}
onload=function(){
var p,m;
p=m=parseInt(getStyle('externa','width','width'));
setInterval(
function(){
if(window.parar)return;
if(p<=-t('interna').offsetWidth)
p=m;
p-=5;
t('interna').style.left=p+'px';
},100);
t('externa').onmouseover=function(){window.parar=1;}
t('externa').onmouseout=function(){window.parar=0;}
}
</script>
</head>
<body>
<div id="externa">
<div id="interna">Colocar aquí el contenido para id "interna"</div>
</div>
</body>
</html>