zl程序教程

您现在的位置是:首页 >  前端

当前栏目

封装轮播图 学轮子不如造轮子详解编程语言

封装编程语言 详解 轮播 不如 轮子
2023-06-13 09:20:36 时间
function getCss(ele,style){ return window.getComputedStyle?getComputedStyle(ele)[style]:obj.CurrentStyle(style);
 //鼠标移动小圆点上颜色变化
function circleColorChange() 
{ for(var i=0;i i++) {
circles[i].index=i; circles[i].onmouseover=function()
{ for(var j=0;j j++){ circles[j].className="oldColor"; }
this.className="newColor" imgBox.style.left=(this.index+1)*imgWidth*-1+"px";
} } }
circleColorChange();
//当用户不操作时,也会自动切换图片 animation=setInterval(function(){ moveR(); },2000);
//鼠标移动在上面的时候清除自动播放 slider.onmouseover=function(){ clearInterval(animation); //鼠标移开的时候自动播放开始 slider.onmouseout=function(){ animation=setInterval(function(){ moveR(); },2000); }
//调用 slider(500,490, { 0:".circles ul li", 1:".slider", 2:".box ul", 3:".prev", 4:".next" }); /script

 

原创文章,作者:Maggie-Hunter,如若转载,请注明出处:https://blog.ytso.com/12283.html

cjava