Ext学习之3_类Element和Fx

Ext.namespace("com.deng");
/**
 * 让界面动起来,即动画效果
 * 虽然动画效果应用于Ext.Element对象,却不定义在Ext.Element类中,而是定义在Ext.Fx中,最后在
 * Ext.Fx中通过Ext.apply(Ext.Element.prototype,Ext.Fx)自动应用到Element对象,所有的基本效果直接
 * 通过Element调用
 */

/**
 * Ext.Fx类
 * slideIn([String anchor],[Object options]);
 * 功能: 滑入效果,作动画显示
 * 参数:
 *     anchor: 推出的方向,定义了8种不同的方向,值不区别大小写,可选,分别如下
 *     			tl: 左上角
 *     			t: 顶部中央
 *     			tr: 右上角
 *     			l: 左边中央
 *     			r:右边中央
 *     			bl: 左下角
 *     			b:底部中央
 *     			br:右下角
 *   options: 选项配置,常用duration属性,用于定义动画持续的时间,可选。默认配置:
 *   slideIn("t",{
 *   	easing: 'easeOut',
 *      duration: .5
 *   });
 *   
 *  举例说明:在10秒中之内将div从右边中央滑入   
 */

/**
Ext.onReady(function() {
	Ext.get("a1").applyStyles({
		position : "absolute",
		top : 200,
		left : 200,
		backgroundColor : "red",
		width : 100,
		height : 100
	}).slideIn("r", {
		duration : 10
	})
});
*/

/**
 * applyStyles是Ext.Element的方法,用于定义指定元素的样式
 */

/**
 * slideOut([String anchor],[Object options]): 滑出效果,作动画隐藏,用法同以上,默认:
 * slideOut("t",{
 *      easing:'easeOut',
 *      duration: .5,
 *      remove: false,
 *      useDisplay: false
 * });
 */
 

 

你可能感兴趣的:(prototype,ext)