现在的位置: 首页 > 综合 > 正文

滚动文字、滚动图片代码

2018年02月08日 ⁄ 综合 ⁄ 共 2478字 ⁄ 字号 评论关闭
作者:Linger 2007-03-15 20:58:50
   
 

运用下面的代码,加入你所希望看到的文字,就能使你的博客外观发生不同哦!

 滚动文字代码: <marquee scrollAmount=3 width=200>灯火阑珊</marquee>(文字可随意替换)效果图:

灯火阑珊

滚动图片代码: <marquee scrollAmount=3 width=200><IMG src="http://images.blogcn.com/2005/9/8/8/yanxin16,20050908143744.gif" border=0></marquee>(图片链接地址可随意替换)效果图:

450)this.style.width=450;" border=0>

各参数详解: scrollAmount,它表示速度,值越大速度越快。如果没有它,默认为6,建议设为1~3比较好。 width和height,表示滚动区域的大小,width是宽度,height是高度。特别是在做垂直滚动的时候,一定要设height的值。 direction,表示滚动的方向,默认为从右向左。可选的值有right、down、up。滚动方向分别为:right表示从左到右,up表示从下到上,down表示从上到下。 behavior,用它来控制属性,默认为循环滚动,可选的值有alternate(交替滚动)、slide(幻灯片效果),指的是滚动一次,然后停止滚动

给滚动字幕加超级链接,只要在文字外面加上<a href=链接地址>和</a>就可以了。如代码为:<marquee scrollAmount=3 width=200><a href="/http://www.blogcn.com/user54/yanxin16/index.html>灯火阑珊</a></marquee> 效果图: 灯火阑珊

当鼠标停留在文字上,文字停止 代码为:<marquee scrollAmount=3 width=200 onmouseover=stop() onmouseout=start()>灯火阑珊</marquee> 效果图:

灯火阑珊交替效果代码为:<marquee scrollAmount=3 width=200 behavior=alternate>灯火阑珊</marquee> 效果图: 灯火阑珊多行文本向上滚动代码为:<marquee scrollAmount=3 width=200 height=100 direction=up>·蓦然回首!<br>·灯火阑珊<br>·在水一方<p></marquee> 效果图: ·蓦然回首! ·灯火阑珊 ·在水一方

width和height的值可以根据自身页面大小调整,direction为down时,向下滚动。<br>为换行空格。同理,文字也可以改为图片链接。

改变滚动字幕的颜色代码为:<marquee scrollAmount=3 width=200><font color=#e61a94 >爱是玫瑰色的!</font></marquee>。效果图: 爱是玫瑰色的!颜色代码可依据个人喜好,更换。

 

 

<marquee scrollamount=1> 文字很慢滚。 </marquee> 文字很慢滚。<marquee onmouseover=this.stop() onmouseout=this.start() > 鼠标放上去停止滚动,移开继续滚动。 </marquee> 鼠标放上去停止滚动,移开继续滚动。<marquee direction=left scrollamount=3> 文字向左滚。 </marquee> 文字向左滚。<marquee direction=right scrollamount=3> 文字向右滚。 </marquee> 文字向右滚。<marquee direction=up scrollamount=3> 文字向上滚。 </marquee> 文字向上滚。<marquee direction=down scrollamount=3> 文字向下滚。 </marquee> 文字向下滚。<marquee scrollamount=3 behavior=alternate> 文字来回滚。 </marquee> 文字来回滚。<marquee scrolldelay=500 scrollamount=100>走一步,停一停!</marquee> 走一步,停一停!

<marquee bgcolor=aaaaee>设置底色的文字</marquee>

 

 
1.向左滚动代码:

<marquee scrollAmount=2 width=300>你想滚动什么</marquee>

    2.图片滚动代码:

<marquee scrollAmount=2 width=300><IMG src="http://yuyuflower.52blog.net/user1/22713/upload/20058308120.gif" border=0></marquee>

    3.滚动字幕连接代码:

<marquee scrollAmount=2 width=300><a href=http://yingling21.52blog.net/user1/26852/index.shtml>消失部落</a></marquee>

 点击消失部落就可以进入了       4.鼠标停留在文字上,文字停止滚动

<marquee scrollAmount=2 width=300 onmouseover=stop() onmouseout=start()>文字内容</marquee>

    5.多行文本向上滚动:

<marquee scrollAmount=2 width=300 height=160 direction=up>我不在乎有满身的伤口<br>在乎的只是你一句话<br>为什么你都不能回答我呢?<p>·<a href=http://yingling21.52blog.net/user1/26852/index.shtml>消失部落</a></marquee>

 

 

更多技术文章请参看施昌权的个人网站: http://www.joyvc.cn

 

抱歉!评论已关闭.