请选择 进入手机版 | 继续访问电脑版
查看: 108|回复: 1

《爱情是个鸟(DJ版)》- 顾婧平

[复制链接]

签到天数: 183 天

[LV.7]常住居民III

鲜花(0) 鸡蛋(0)
发表于 2022-12-4 21:43 | 显示全部楼层 |阅读模式













































签到天数: 80 天

[LV.6]常住居民II

鲜花(15) 鸡蛋(0)
发表于 2022-12-5 07:43 | 显示全部楼层
var imgSet =  [];
var keyFrames =
        [];

var EffectTiming = {duration: 8000, fill: 'forwards'};
var imgIdx = 0, lastIdx = imgSet.length - 1;
var imgBlock, curp, aniObj;

        function initTrun()        {
                imgBlock = document.getElementById('hWindow');
                curp = document.getElementById('curp');
               
                aniObj = curp.animate(keyFrames, EffectTiming);
                aniObj.pause();
                aniObj.onfinish = chg_cur_pic;
                chg_cur_pic();        //my_audio.play();
        }
        function chg_cur_pic()        {
                imgBlock.style.backgroundSize = "cover";
                imgBlock.style.backgroundImage = "url(" + imgSet[lastIdx] + ")";
                curp.style.backgroundImage = "url(" + imgSet[imgIdx] + ")";       
                lastIdx = imgIdx;
                imgIdx++;
                imgIdx %= imgSet.length;               
                aniObj.play();
        }
       
        initTrun();


多余的代码
您需要登录后才可以回帖 登录 | 中文注册

本版积分规则

网站地图|小黑屋|Archiver|中画网 ( 蜀ICP备11021737号-2 )|网站地图

GMT+8, 2024-3-29 18:33 , Processed in 0.034948 second(s), 12 queries , MemCached On.

上网要文明 发言要理性

Powered by Discuz! © 2008-2023 YinHuaBBS.CN

快速回复 返回顶部 返回列表