• 手机版

    扫码体验手机版

  • 微信公众号

    扫码关注公众号

国内首家协议开发

软芯音视解码保护平台

在线
客服

发布
需求

在线
聊天

天盟
APP

天盟APP下载

关注
微信

微信扫一扫访问
顶部

这个轮播图切换出现异常,

Examples

    *{margin: 0;padding: 0;}
    a{text-decoration: none;color: #333;}
    ul,li{list-style: none;}
    body{font-size: 14px;font-family: "微软雅黑";}
    #box{width: 970px;height: 350px;margin: 50px auto;position: relative;}
        #imgBox li{width: 970px;height: 350px;position: absolute;opacity: 0;}
        #imgBox li img{width: 970px;height: 350px;}
        #btnBox{width: 120px;position: absolute;left: calc(50% - 60px);bottom: 10px;}
        #btnBox li{width: 20px;height: 20px;border-radius: 50%;margin: 0 5px;background: #f60;color: #fff;text-align: center;line-height: 20px;float: left;cursor: pointer;}
        #btnBox li.active{background: #E71BB9;}
        #left{left: 10px;}
        #right{right: 10px;}
        .item{width: 60px;height: 80px;background: rgba(0,0,0,.4);color: #fff;text-align: center;line-height: 80px;position: absolute;top: calc(50% - 40px);font-size: 24px;display: none;}
        #box:hover .item{display: block;}




        

                

  •             

  •             

  •             

  •         

        

                
  • 1
                
  • 2
                
  • 3
                
  • 4
            



        <
        >
   

   
    <script type="text/javascript">
    var box=document.getElementById('box');
    var imgBox=document.querySelectorAll("#imgBox li");
    var btnBox=document.querySelectorAll("#btnBox li");
    var left = document.getElementById("left");
    var right = document.getElementById('right');
    var times=null;
    var date=new Date();
    for(var i=0;i0时说明快接近目标目标值,如果小于想下取整
            if(cur!=start){
                if(key=='opacity'){
                    dom.style[key]=(speed+cur)/100;
                     dom.style.filter = "alpha(opacity="+(cur+speed)+")"
                }else{
                    dom.style[key]=speed+cur+'px';
                    dom.style.filter = "alpha(opacity="+(cur+speed)+")"
                }
                 mark=false;
            }
            if(mark){
                clearInterval(dom.times);
                callBack&&callBack.call(dom);
            }
        }
    },1000/13)
}
function getStyle(dom,attr){
    return dom.currentStyle?dom.currentStyle[attr]:getComputedStyle(dom)[attr];
}
点击左边无法进行切换
index.html:72 Uncaught ReferenceError: dsymy is not defined     at HTMLAnchorElement.left.onclick

免责声明:本内容仅代表回答会员见解不代表天盟观点,请谨慎对待。

版权声明:作者保留权利,不代表天盟立场。

使用道具 举报

全部参与1

dsymy 这个变量没有定义

使用道具 举报

发新帖

发布任务需求已有1031168位用户正在使用天盟网服务

发布分类: *
任务预算: *
需求内容: *
手机号码: *
任务商家报价为
  • 预算价 :
  • 成交价 :
  • 完工期 :
  • 质保期 :

* 最终任务项目以服务商报价、双方协商为准!