var aofeikeyFrames;
function keyFrames(id, img, width, height, keyFrames){
keyFrames = new CanvasKeyFrames(document.querySelector(id), 'sprite', img, {
fps:10,
imgWidth:width,
imgHeight:height,
width:50,
height:50
});
keyFrames.play();
}
var aofei = new Image();
aofei.src = 'img/en_aofei.png';
$(".aofei").css("width", '7.5rem');
$(".aofei").css("height", '1.8975rem');
$(".aofei").css("margin-right", '-9.5rem');
$(".aofei").css("margin-bottom", '-7rem');
aofei.onload = function(){
aofei.onload = null;
keyFrames(".aofei", aofei, 373, 120, aofeikeyFrames);//div对象 对应图片 序列帧动画宽度 序列帧动画高度 指定序列帧对象
}