YUI Research -- Animation Module

来源:互联网 发布:淘宝下载安装免费 编辑:程序博客网 时间:2024/05/31 19:22

<script type="text/javascript"><!--google_ad_client = "pub-0241434510974184";/* 博客文章广告728x90, */google_ad_slot = "7316585398";google_ad_width = 728;google_ad_height = 90;// --></script><script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script>

 YAHOO.util.Anim 实现动画的基础功能

patterns

正则表达式缓存。

toString() 打印id

doMethod(attr, start, end) 返回经过动画策略计算的值


setAttribute(attr, val, unit) 设置元素的样式
判断attr是否是非负属性,如果是且val<0,则把val置0。不为负值的属性是width,height,opacity和padding。

getAttribute(attr) 获取元素当前属性值
当attr为width、height、top或left的时,其值有可能是auto,所以要用offsetXXX计算

getDefaultUnit(attr) 获取attr的默认单位

原创粉丝点击