Javascript
The code produced does not give everyone comment! The picture in the code everyone can add their own super connection, the modified method is: <a href= "connected address" target=_blank></a>
First make the effect of scrolling up:
<!--point to link picture url-->
<base href= "http://www.xrss.cn" >
<div Id=demo style=overflow:hidden;height:150;width:90;background: #214984; color: #ffffff >
<div id=demo1>
<!--definition picture-->
</div>
<div id=demo2></div>
</div>
<script>
var speed=30
Demo2.innerhtml=demo1.innerhtml
function Marquee () {
if (demo2.offsettop-demo.scrolltop<=0)
Demo.scrolltop-=demo1.offsetheight
else{
demo.scrolltop++
}
}
var mymar=setinterval (Marquee,speed)
Demo.onmouseover=function () {clearinterval (MyMar)}
Demo.onmouseout=function () {Mymar=setinterval (marquee,speed)}
</script>
Make the effect of scrolling down:
Replace the red font JS portion of the above "make up scrolling effect" with the following:
<script>
var speed=30
Demo2.innerhtml=demo1.innerhtml
Demo.scrolltop=demo.scrollheight
function Marquee () {
if (demo1.offsettop-demo.scrolltop>=0)
Demo.scrolltop+=demo2.offsetheight
else{
demo.scrolltop--
}
}
var mymar=setinterval (Marquee,speed)
Demo.onmouseover=function () {clearinterval (MyMar)}
Demo.onmouseout=function () {Mymar=setinterval (marquee,speed)}
</script>
Make a left scroll effect:
<base href= "http://www.xrss.cn"
<div id=demo Style=overflow:hidden;height:33;width:200;background : #214984; color: #ffffff
<table align=left cellpadding=0 cellspace=0 border=0>
<tr>
<td Id=demo1 valign=top> </td>
<td id=demo2 valign=top></td>
</tr>
</table>
</div>
<script>
var speed=30
Demo2.innerhtml=demo1.innerhtml
function Marquee () {
if (demo2.offsetwidth-demo.scrollleft<=0)
Demo.scrollleft-=demo1.offsetwidth
else{
demo.scrollleft++
}
}
var mymar=setinterval (Marquee,speed)
Demo.onmouseover=function () {clearinterval (MyMar)}
Demo.onmouseout=function () {Mymar=setinterval (marquee,speed)}
</script>
Make the right scrolling effect:
Replace the red Font JS section in the "Make left scrolling effect" above:
<script>
var speed=30
Demo2.innerhtml=demo1.innerhtml
Demo.scrollleft=demo.scrollwidth
function Marquee () {
if (demo.scrollleft<=0)
Demo.scrollleft+=demo2.offsetwidth
else{
demo.scrollleft--
}
}
var mymar=setinterval (Marquee,speed)
Demo.onmouseover=function () {clearinterval (MyMar)}
Demo.onmouseout=function () {Mymar=setinterval (marquee,speed)}
</script>