主题 : jeecms 3.0 的图片跑马灯的 滚动方向如何设置 |
级别: 举人
![]() |
1# 发表于:2012-10-22 09:23:10 IP:223.191.*.*
|
||||
---|---|---|---|---|---|
级别: 举人
![]() |
3# 发表于:2012-10-22 09:42:38 IP:223.191.*.*
类似于marquee 标签的一个滚动 功能 , content_list ,我试了一下滚动 现在图片是像左滚动,我想要的效果是像右滚动,不知道如何实现
|
||
---|---|---|---|
级别: 状元
![]() |
4# 发表于:2012-10-22 09:46:24 IP:59.245.*.*
以下js放在head标签里。
<script src="${resSys}/jquery.js" type="text/javascript"> </script> <script src="${resSys}/front.js" type="text/javascript"> </script> [@cms_content_list topicId='1' typeId='2' count='8' styleList='2-4' titLen='16' rollLineHeight='70' rollSpan='1' rollSpeed='1' tpl='2'/] 说明: rollLineHeight: 滚动区行高;【按像素px计算】不能为空 rollSpeed: 滚动速度;【滚动速度,值越小越快,最小为1】不能为空 rollSpan: 滚动跨度;【一次滚动的像素,跨度越大,滚动就越快,但越不流畅】不能为空 topicId='1'滚动中的图片要属于一个专题 typeId='2'图片所在内容是图文类型 |
||
---|---|---|---|
级别: 举人
![]() |
6# 发表于:2012-10-22 10:01:48 IP:223.191.*.*
是这样的,同一个页面我既要有向左滚动,又要有向右滚动,这样改js也不行啊。。。
|
||
---|---|---|---|
级别: 举人
![]() |
8# 发表于:2012-10-22 10:18:44 IP:223.191.*.*
我刚研究了一下,是可以实现的
|
||
---|---|---|---|
级别: 举人
![]() |
9# 发表于:2012-10-22 10:19:37 IP:223.191.*.*
需要定制 style_2-4.html 文件 和
Cms.LeftRoller = function(rid, speed, rollSpan) { this.rid = rid; this.speed = speed; this.rollSpan = rollSpan; this.proll = $('#roll-' + rid); this.prollOrig = $('#roll-orig-' + rid); this.prollCopy = $('#roll-copy-' + rid); this.prollCopy[0].innerHTML = this.prollOrig[0].innerHTML; var o = this; this.pevent = setInterval(function() { o.roll.call(o) }, this.speed); } Cms.LeftRoller.prototype.roll = function() { if (this.proll[0].scrollLeft > this.prollCopy[0].offsetWidth) { this.proll[0].scrollLeft = this.rollSpan + 1; } else { this.proll[0].scrollLeft += this.rollSpan; } } |
||
---|---|---|---|