Raphael.js API之Paper.image(),Element.animate()
来源:互联网 发布:centos设置不锁屏 编辑:程序博客网 时间:2024/06/05 04:54
/*API-6*/
Element.animate()
为给定的元素创建和启动动画
参数列表:
1:参数
Object类型
为最终的元素设置属性[比如在Element.drag()中的onend事件中设置元素属性:
function onend()
{
this.animate({"fill-opacity": 1}, 300);
}]
2:ms
number类型,动态语言将原生数据类型除了布尔类型归于number类型
动画执行时间,以毫秒计数
3:easing
可选参数
字符串类型 string
宽松的属性设置,如CSS
4:回收
可选参数
function
在完成动画之后执行
animation中有方法可以代替此方法
返回类型:对象原始元素 Object original element
/*API-92*/
Paper.image()
Paper.image(src,x,y,width,height)
嵌入一个图片到画纸上
参数列表:
src 路径
字符串 string
图片的URL
x
number类型
需要嵌入位置的x坐标
y
number类型
需要嵌入位置的y坐标
width
number类型
设置图片显示宽度
height
number类型
设置图片显示高度
返回值:拥有type为image属性的Raphael的对象
示例:var iamge = paper.image("example.png",10,10,80,80);
Element.animate()
为给定的元素创建和启动动画
参数列表:
1:参数
Object类型
为最终的元素设置属性[比如在Element.drag()中的onend事件中设置元素属性:
function onend()
{
this.animate({"fill-opacity": 1}, 300);
}]
2:ms
number类型,动态语言将原生数据类型除了布尔类型归于number类型
动画执行时间,以毫秒计数
3:easing
可选参数
字符串类型 string
宽松的属性设置,如CSS
4:回收
可选参数
function
在完成动画之后执行
animation中有方法可以代替此方法
返回类型:对象原始元素 Object original element
/*API-92*/
Paper.image()
Paper.image(src,x,y,width,height)
嵌入一个图片到画纸上
参数列表:
src 路径
字符串 string
图片的URL
x
number类型
需要嵌入位置的x坐标
y
number类型
需要嵌入位置的y坐标
width
number类型
设置图片显示宽度
height
number类型
设置图片显示高度
返回值:拥有type为image属性的Raphael的对象
示例:var iamge = paper.image("example.png",10,10,80,80);
0 0
- Raphael.js API之Paper.image(),Element.animate()
- Raphael.js API之 Element.raphael,Paper.raphael,Paper.print()
- Raphael.js API之Raphael.svg(),Element.paper,Element.pause(),Raphael.pathBBox(),Raphael.st,Raphael.el
- Raphael.js API之 Paper.path(),Element.click()
- Raphael.js API 之Element.unclick(),Paper.add(),Paper.rect(),Element.status()
- Raphael.js API之Element.unXXX(),Paper.getElementByPoint(),Paper.getElementsByPoint(),vee(),Element.ge
- Raphael.js API 之Element.remove(),Element.removeData(),paper.text(),Element.node(),Element.onDragOver
- Raphael.js API之Element.id,Element.insertAfter(),Element.insertBefore(),Element.hide(),Paper.clear(),
- Raphael.js API之Raphael.getPointAtLength(),Paper.forEach(),Paper.remove(),Paper.set(),Paper.setStart(
- Raphael.js API之Raphael.angle(),Raphael.rad(), Paper.customAttributes,Paper.renderfix()
- Raphael.js API 之 Element.attr()
- Raphael.js API之Element.clone(),Element.data(),Element.dblclick()
- Raphael.js API之Element.drag(),Element.toBack()
- Raphael.js API之Raphael.pathIntersection(),Raphael.pathToRelative(),Set.clear(),Set.exclude(element)
- Raphael.js API之Element.mousedown(),Element.mousemove(),Element.mouseup(),Element.mouseout(),Element.
- Raphael.js API之 Animation.delay(),Animation.repeat(),Element.animateWith()
- Raphael.js API之 Raphael.getTotalLength(),Raphael.fn
- Raphael学习之Paper常用API(四)
- 【iOS】Xib的使用与File'Owner总结
- 两个activity界面间跳转切换动画效果
- 初级报表生成饼状图,条形图,柱状图
- 解决新建Support7Demos的sample时出现编译错误和运行报错出现的问题
- test
- Raphael.js API之Paper.image(),Element.animate()
- C#委托机制
- big_data_mul
- Windows 8 文件选择器(FileOpenPicker,FileSavePicker,FolderPicker)
- The requested URL could not be retrieved/ TCP_DENIED/403
- 不只看球 解析巴西世界杯背后的显示“因素”
- JAVA数组的equals方法
- VLC命令行参数详解
- VirtualBox+CentOS6.5安装增强功能包 - Building the main Guest Additions module [失败]