为了账号安全,请及时绑定邮箱和手机立即绑定

小圆点问题

 var prev = document.getElementById('prev');

            var next = document.getElementById('next');

            var index = 1;

            

           function showButton() {

                for (var i = 0;i<buttons.length;i++){

                    if (buttons[i].ClassName=='on') {

                        buttons[i].ClassName=='';

                    }

                }

                buttons.[index - 1].ClassName='on';

            }


            function animate(offset){

                list.style.left = parseInt(list.style.left)+offset+'px';

            }


            next.onclick = function(){

                animate(-300);

                index =index+1;

                showButton();

            }

             prev.onclick = function(){

                animate(300);

                index =index-1;

                showButton();

               

            }

             

        }

为什么我这样写之后不能向左向右移动了,小圆点也不能亮起来

正在回答

2 回答

我只是将图片的大小变为了300,其他几乎没变

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

小圆点问题

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信