腾讯游戏英雄杀官网图片轮播特效

腾讯游戏英雄杀官网图片轮播特效

添加时间:2021-02-12 08:52:03
站长推荐丨赞助论坛,可获取海量资源终身免费下载权限奥!
举报 举报
收藏
预览
附件 附件
  • 模板类型模板类型:图片轮播
  • 模板颜色模板颜色:初级
  • 下载积分下载积分:28 米粒
  • 下载权限下载权限:

    赞助会员

此作品是他刚整理腾讯游戏英雄杀官网图片轮播特效,实现了图片旋转轮播效果,没有用到jquery,是用原生Javascript实现的,效果很棒,大家好好看一下哦。。。

分类:图片代码 > 图片轮播 难易:初级

初始化代码如下:

function Zoompic()
    {
       this.initialize.apply(this,arguments);
    }
    Zoompic.prototype=
    {
        initialize:function(id)
        {
           var _this=this;
           this.box=typeof id=="string"?document.getElementById(id):id;
           this.oPre=this.box.getElementsByTagName('pre')[0];
           this.oNext=this.box.getElementsByTagName('pre')[1];
           this.oUl=this.box.getElementsByTagName('ul')[0];
           this.aLi=this.oUl.getElementsByTagName('li');
           this.timer=null;
           this.iCenter=3;
           this.aStor=[];
            this.options = [
                {width:120, height:150, top:71, left:134, zIndex:1},
                {width:130, height:170, top:61, left:0, zIndex:2},
                {width:170, height:218, top:37, left:110, zIndex:3},
                {width:224, height:288, top:0, left:262, zIndex:4},
                {width:170, height:218, top:37, left:468, zIndex:3},
                {width:130, height:170, top:61, left:620, zIndex:2},
                {width:120, height:150, top:71, left:496, zIndex:1}
            ];
           for(var i=0;i<this.aLi.length;i++) this.aStor[i]=this.aLi[i];
           this.up();
            this._oNext=function()
            {
                return _this.doNext.apply(_this);
            }
            this._oPre=function()
            {
                return _this.doPre.apply(_this);
            }
           this.addBing(this.oNext,"click",this._oNext);
           this.addBing(this.oPre,"click",this._oPre);
           setInterval(this._oNext,5000);
        },
        doNext:function()
        {
          this.aStor.unshift(this.aStor.pop());
          this.up();
        },
        doPre:function()
        {
          this.aStor.push(this.aStor.shift());
          this.up();
        },
        up:function()
        {
          _this=this;
           for(var i=0;i<this.aStor.length;i++) this.oUl.appendChild(this.aStor[i]);
            for(var i=0;i<this.aStor.length;i++)
            {
               this.aStor[i].index=i;
               if(i<7)
               {
                   this.css(this.aStor[i],"display","block");
                   this.starMove(this.aStor[i],this.options[i],function()
                   {
                       _this.starMove(_this.aStor[_this.iCenter].getElementsByTagName('img')[0],{opacity:100},function()
                       {
                           _this.aStor[_this.iCenter].onmouseover=function()
                           {
                               _this.starMove(this.getElementsByTagName('div')[0],{bottom:0});
                           }
                           _this.aStor[_this.iCenter].onmouseout=function()
                           {
                               _this.starMove(this.getElementsByTagName('div')[0],{bottom:-100});
                           }
                       });
                   })
               }
                if(i<this.iCenter || i>this.iCenter)
                {
                    this.css(this.aStor[i].getElementsByTagName('img')[0],"opacity",30);
                    this.aStor[i].onmouseover=function()
                    {
                     _this.starMove(this.getElementsByTagName('img')[0],{opacity:100});
                    }
                    this.aStor[i].onmouseout=function()
                    {
                        _this.starMove(this.getElementsByTagName('img')[0],{opacity:30});
                    }
                    this.aStor[i].onmouseout();
                }else
                {
                    this.aStor[i].onmouseover=this.aStor[i].onmouseout=null;
                }
            }
        },
相关内容推荐
资源求助发帖
查看更多发帖

*

回帖描述:

*

链接类型:

*

下载链接:

密码:
发帖规则:回帖内容为会员之间的私信,普通网友无法查看。
免责声明:回帖中提供的链接内容仅供会员之间学习参考使用,获取内容后请在法律法规范围内使用。回帖提供的内容应符合法律法规要求,不得违反法律法律的要求。
站点权责:回帖内容如违反法律法规,站点有权封停账号使用权利。对用户举报的内容,站点有责任及时删除违规内容。
热点内容推荐
标题:腾讯游戏英雄杀官网图片轮播特效

*

描述:
平均回复时间:3-10分钟
规则介绍:悬赏寻求论坛网友分享资源,站点对分享内容的准确性,合法性,版权等没有足够的监管能力。如果您发现资源不正确,无法使用,不符合法律法律等情况,您可以直接举报资源。站长将尽快核实您的举报,并根据情况,采取封号,退换米粒等处理。

*

回帖描述:

*

链接类型:

*

阅读权限:

*

下载链接:

密码:
发帖规则:回帖内容为会员之间的私信,普通网友无法查看。
免责声明:回帖中提供的链接内容仅供会员之间学习参考使用,获取内容后请在法律法规范围内使用。回帖提供的内容应符合法律法规要求,不得违反法律法律的要求。
站点权责:回帖内容如违反法律法规,站点有权封停账号使用权利。对用户举报的内容,站点有责任及时删除违规内容。
  • 背景波浪
  • 背景波浪
  • 波浪
  • 波浪
客服
在线咨询
周一 至 周日 9:00 ~ 22:00
QQ:1326974360
微信:juyoubuluo6688
客服热线
18205485173
工作日 9:00 ~ 18:00
微信扫码咨询
客户服务
欢迎咨询服务
咨询量较多时,请耐心等待
社群

关注公众号

获取更多资讯

扫码进群(QQ)

与更多大牛交流沟通

0.094706s