方法一:MARQUEE是最簡單的一種,把要想滾動的內(nèi)容放到<marquee></marquee>中,代碼如下:
<marquee behavior="scroll" align="middle" direction="right" onmouseover="this.stop()" onmouseout="this.start()">
這里可以放圖片或者文字
</marquee>
標(biāo)簽內(nèi)的direction="xxx"  可以替換為 up down left right
方法二:用js+div來寫,稍微復(fù)雜些
	<div id=cfdemo style="overflow: hidden; width: 100%; height: 120px">
	<table cellspacing=0 cellpadding=0 align=left border=0 cellspace="0">
	<tbody>
	<tr>
	<td id=cfdemo1>
	要滾動的內(nèi)容,這個滾動是不間隔的滾動
	</td>
	<td id=cfdemo2 width=10></td></tr></tbody></table></div>
	
	
	
		<script>
	
		var speed=20; //改變該數(shù)值可改變滾動速度,數(shù)值越小,速度越快
	
		cfdemo2.innerhtml=cfdemo1.innerhtml
	
		function cfmarquee(){
	
		if(cfdemo2.offsetwidth-cfdemo.scrollleft<=0)
	
		cfdemo.scrollleft-=cfdemo1.offsetwidth
	
		else{
	
		cfdemo.scrollleft++
	
		}
	
		}
	
		var cfmar=setinterval(cfmarquee,speed)
	
		cfdemo.onmouseover=function() {clearinterval(cfmar)}
	
		cfdemo.onmouseout=function() {cfmar=setinterval(cfmarquee,speed)}
	
		</script>