美文网首页
初学Raphael

初学Raphael

作者: 释迦魔尼 | 来源:发表于2016-05-18 19:19 被阅读0次

画布-Raphael

1.Raphael(zx,zy,width,heigth)  zx:坐标x    zy:坐标y 
2.Raphael(id,width,heigth)  id:dom上的ID

动画-Animation

Animation.delay([number])  动画延迟执行的事件 单位毫秒
Animation.repeat([number])  动画执行的次数

元素-Element

Element.animate()

Element.animate(params, ms, easing, callback)  
params:元素的最终属性  
ms:动画持续的时间  
easing:运动类型  
callback:运动成功后的回调函数
或
Element.animate(animation)  动画对象

Element.animateWith()

Element.animateWith(element, anim, params, ms, easing, callback)  
element:元素  
anim:要同步的动画
params:元素的最终属性  
ms:动画持续的时间  
easing:运动类型  
callback:运动成功后的回调函数
 或
Element.animateWith(element, anim, animation)   
element:元素  
anim:要同步的动画  
animation:动画对象

Element.attr()

赋值  Element.attr(name,value)
赋值  Element.attr({name:value})
取值  Element.attr(name)
取值  Element.attr([name]) 返回值数组

相关文章

网友评论

      本文标题:初学Raphael

      本文链接:https://www.haomeiwen.com/subject/pkpwrttx.html