跑马灯最后一行后面有留白是哪里没设置好 setInterval(function() { //隐藏报表块report0的滚动条(此报表块名为report0,根据具体情况修改) $("div[widgetname=RP1]").find(".frozen-north").css({ 'overflow-x':'hidden', 'overflow-y':'hidden' }); $("div[widgetname=RP1]").find(".frozen-center").css({ 'overflow-x':'hidden', 'overflow-y':'hidden' }); },100); window.flag2 = true; //鼠标悬停,滚动停止 setTimeout(function() { $("div[widgetname=RP1]").find(".frozen-center").mouseover(function() { window.flag2 = false; }); //鼠标离开,继续滚动 $("div[widgetname=RP1]").find(".frozen-center").mouseleave(function() { window.flag2 = true; }); var old = -1; var interval = setInterval(function() { if(window.flag2) { currentpos2 = $("div[widgetname=RP1]").find(".frozen-center")[0].scrollTop; if(currentpos2 == old) { $("div[widgetname=RP1]").find(".frozen-center")[0].scrollTop = 0; } else { old = currentpos2; //以25ms的速度每次滚动1.5PX $("div[widgetname=RP1]").find(".frozen-center")[0].scrollTop = currentpos2 + 1.5; } } }, 150); }, 1000) |
最佳回答 |
||||
0
|
|