主题 : 关于滚动资讯
级别: 举人
UID: 81074
积分:101 加为好友
威望: 8 精华: 0
主题:12 回复:55
注册时间:2015-10-15
在线时长:0
1#   发表于:2015-11-11 14:32:53  IP:106.220.*.*
[@cms_content_list styleList='2-1'  titLen='16' count='9' rollCols='3' rollDisplayHeight='30' rollLineHeight='30' rollSpeed='20' rollSleepTime='50' rollRows='1' dateFormat='MM-dd' datePosition='3' dateClass='red' channelOption='1' tpl='2'/]

我想只滚动展示一个 为啥将rollCols设为一。会将数据全部展示出来,虚心请教!
级别: 版主
UID: 70293
积分:78391 加为好友
威望: 1 精华: 0
主题:7 回复:68397
注册时间:2014-12-03
在线时长:0
2#   发表于:2015-11-11 14:33:43  IP:111.212.*.*
滚动特效要用js控制的
1
级别: 举人
UID: 81074
积分:101 加为好友
威望: 8 精华: 0
主题:12 回复:55
注册时间:2015-10-15
在线时长:0
3#   发表于:2015-11-11 14:36:36  IP:106.220.*.*
回复第2楼找到一个向上滚动的JS类,我去试试
级别: 版主
UID: 70293
积分:78391 加为好友
威望: 1 精华: 0
主题:7 回复:68397
注册时间:2014-12-03
在线时长:0
4#   发表于:2015-11-11 14:36:54  IP:111.212.*.*
1
级别: 举人
UID: 81074
积分:101 加为好友
威望: 8 精华: 0
主题:12 回复:55
注册时间:2015-10-15
在线时长:0
5#   发表于:2015-11-11 14:40:15  IP:106.220.*.*
回复第4楼Cms.UpRoller = function(rid, speed, isSleep, sleepTime, rollRows, rollSpan,
unitHight) {
this.speed = speed;
this.rid = rid;
this.isSleep = isSleep;
this.sleepTime = sleepTime;
this.rollRows = rollRows;
this.rollSpan = rollSpan;
this.unitHight = unitHight;
this.proll = $('#roll-' + rid);
this.prollOrig = $('#roll-orig-' + rid);
this.prollCopy = $('#roll-copy-' + rid);
// this.prollLine = $('#p-roll-line-'+rid);
this.sleepCount = 0;
this.prollCopy[0].innerHTML = this.prollOrig[0].innerHTML;
var o = this;
this.pevent = setInterval(function() {
o.roll.call(o)
}, this.speed);
}
Cms.UpRoller.prototype.roll = function() {
if (this.proll[0].scrollTop > this.prollCopy[0].offsetHeight) {
this.proll[0].scrollTop = this.rollSpan + 1;
} else {
if (this.proll[0].scrollTop % (this.unitHight * this.rollRows) == 0
&& this.sleepCount <= this.sleepTime && this.isSleep) {
this.sleepCount++;
if (this.sleepCount >= this.sleepTime) {
this.sleepCount = 0;
this.proll[0].scrollTop += this.rollSpan;
}
} else {
var modCount = (this.proll[0].scrollTop + this.rollSpan)
% (this.unitHight * this.rollRows);
if (modCount < this.rollSpan) {
this.proll[0].scrollTop += this.rollSpan - modCount;
} else {
this.proll[0].scrollTop += this.rollSpan;
}
}
}
}
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;
}
}

版主,能否指点下这个怎么看 我该去哪里设置他的属性
级别: 版主
UID: 70293
积分:78391 加为好友
威望: 1 精华: 0
主题:7 回复:68397
注册时间:2014-12-03
在线时长:0
6#   发表于:2015-11-11 14:41:12  IP:111.212.*.*
抱歉,这个请自己研究
1
1 共1页