织梦dedecms怎么制作循环滚动图片



在织梦dedecms网站中添加一些滚动的图片似乎可以给网站增色不少,但是想要自己制作图片的循环滚动也不是一件很难的事情,在制作的时候只要注意一些细节问题就可以了。


第一步:找到图文资讯代码的位置


将<marquee onMouseOver=”this.stop()” onMouseOut=”this.start()” align=center direction=right scrollamount=1.5 scrolldelay=3 valign=middle behavior=”alternate”> 代码插入


{dede:arclist row=5 titlelen=20 orderby=pubdate type=’image.’ imgwidth=’152′ imgheight=’98’ typeid=’11’ } 的前面





<marquee onMouseOver=”this.stop()” onMouseOut=”this.start()” align=center direction=right scrollamount=1.5 scrolldelay=3 valign=middle behavior=”alternate”>


{dede:arclist row=5 titlelen=20 orderby=pubdate type=’image.’ imgwidth=’152′ imgheight=’98’ typeid=’11’ }


第二步:


将</marquee>插入{/dede:arclist}的后面即可实现滚动


即:</marquee>{/dede:arclist}


主要参数设置:


align:是设定活动字幕的位置,除了居左、居中、居右三种位置外,又增加靠上(top)和靠下(bottom)两种位置。


Direction:用于设定活动字幕的滚动方向是向左(left)、向右(right)、向上(up)、向下(down)。


Behavior:用于设定滚动的方式,主要由三种方式:


behavior=”scroll”表示由一端滚动到另一端;默认为此项


behavior=”slide”:表示由一端快速滑动到另一端,且不再重复;


behavior=”alternate”表示在两端之间来回滚动。


Height:用于设定滚动字幕的高度。


Width:则设定滚动字幕的宽度。


Hspace和vspace:分别用于设定滚动字幕的左右边框和上下边框的宽度.


Scrollamount:用于设定活动字幕的滚动距离。数值越小,滚动的速度就越快。


scrolldelay:用于设定滚动两次之间的延迟时间,数值越小,间隔就越小。


Loop:用于设定滚动的次数,当loop=-1表示一直滚动下去,直到页面更新。


其中默认情况是向左滚动无限次,字幕高度是文本高度;