87,997
社区成员




<div style="height: 70px; width: 300px; border: solid red 1px; overflow: hidden">
<div id="scrollDiv" style="height: 70px; line-height: 70px; width: 300px;position: relative; left: 300px;top: 0px; overflow-y: hidden;">
<div style="float: left; height: 70px; line-height: 70px;">这里有一些文字</div>
<div>
<img src="http://avatar.profile.csdn.net/1/D/2/2_xfcdxg.jpg" height="60" width="60"/>
<img src="http://avatar.profile.csdn.net/B/3/F/2_warison2008.jpg" height="60" width="60"/>
</div>
</div>
</div>
<script>
var d = document.getElementById('scrollDiv');
document.body.onload = function(){
setInterval(function(){
d.style.left = parseInt(d.style.left) - 10;
if(parseInt(d.style.left)<-300){
d.style.left = 300;
}
}, 100);
}
</script>
<html>
<head>
<title> new document </title>
<script language="javascript">
var strText ="笑话一则:小侄用崭新造句,一个崭新的植物人诞生了~~ ";
var i=1;
function run()
{
strText= strText.substring(i,strText.length) + strText.substring(0,i)
document.frmtext.txtstr.value = strText;
setTimeout( "run()",200 );
}
</script>
</head>
<body onload = "run()">
<form name="frmtext">
<input type="text" name="txtstr" size=50>
</form>
</body>
</html>
<div style="height: 40px; width: 300px; border: solid red 1px; overflow: hidden">
<marquee dir='rtl' direction='left' onmouseover="this.stop();" onmouseout="this.start();"><span style="color: red;font-size: 10pt;">如何用JAVASCRIPT实现文字跑马灯(右往左跑)</span> <span style="font-size: 16pt;color: pink;">文字变大了变色了</span>最好能控制速度和文字大小cdefghijklmnopqrstuvwxyz</marquee>
</div>
<div style="height: 25px; width: 300px; border: solid red 1px; overflow: hidden">
<marquee dir='rtl' direction='left' onmouseover="this.stop();" onmouseout="this.start();">ab如题 如何用JAVASCRIPT实现文字跑马灯(右往左跑)最好能控制速度和文字大小cdefghijklmnopqrstuvwxyz</marquee>
</div>