标签: animation prototypejs
这是我的代码:
$$('.container ul')[0].setStyle({ top: '20px' });
有没有办法在Prototype中为该代码设置动画?
谢谢!
答案 0 :(得分:2)
如果您将script.aculo.us添加到将提供您正在寻找的动画的页面中。
尝试使用morph()方法,该方法将在您当前的样式和传递的样式之间进行补间
morph()
$$('.container ul')[0].morph({ top: '20px' });