把以下js的代码改成JQuery(图片走马灯)

2025-02-19 02:59:19
推荐回答(3个)
回答1:

写了个 大概的,还有很大改进的余地,照着思路改改吧~







li{
display: inline;
}
#scroll_div{
width: 200px;
margin: 0 auto;
overflow: hidden;
white-space: nowrap;
position: relative;
}



$.fn.scrollImgLeft = function(options) {
var def={
speed:1,
scrollDiv:$('#scrollDiv'),
scrollBegin:$('#scrollBegin'),
scrollEnd:$('#scrollEnd')
}
var opts = $.extend(def, options);
opts.scrollEnd.html(opts.scrollBegin.html());
function Marquee() { 
if (opts.scrollEnd.outerWidth(true) - opts.scrollDiv.scrollLeft() <= 0) { 
opts.scrollDiv.scrollLeft() -= opts.scrollBegin.outerWidth(true); 
} else { 
opts.scrollDiv.scrollLeft(opts.scrollDiv.scrollLeft()+1); 


var MyMar = setInterval(Marquee,opts.speed) 
scroll_div.onmouseover = function () { 
clearInterval(MyMar); 

scroll_div.onmouseout = function () { 
MyMar = setInterval(Marquee, opts.speed); 
}
}; 
$(function(){
var opt = {
speed:2,
   scrollDiv:$('#scroll_div'),
   scrollBegin:$('#scroll_begin'),
   scrollEnd:$('#scroll_end')
}
$('#scroll_div').scrollImgLeft(opt);
})






  • 11111111

  • 222222

  • 3333

  • 444444

  • 55555555






回答2:

我看不懂是什么😜

回答3:

这样的图片软件可以在手机上下载APP的,有的手机都有自带这样功能的软件,美颜相机,美图秀秀,美拍,修图软件,ps,cad,天正也都可以做到,
必须重新下载。重新都登录。发送发送。把送验证码。从新验证。重重重新登录。回密码。找回密码的。手机微信丢失。同时微信里的红包。也就是了。这样就造成了。造成了经济损失。
这个不是app每个手机都有的记事本,把格式用空格,回车,加上符号就能对齐,就出现了这种形式的!如果截屏就出出现这样的图片了!
支付宝红包再升级,红包种类更多,金额更大!人人可领,天天可领!长按复制此消息,打开支付宝领红包!汇朔S普5维文泰儒翰竹骏

相关问答
最新问答