简单的问题。我在右上角有一些窗口工具,我希望它们在悬停时显示。很简单,我已经做到了
d.animate({ width: 'show',opacity:0.7},120);
一切正常,但它从左到右滑动。如果它从右到左做,看起来会更好。是否可以在不扩展代码的情况下简单地更改它?
http://jsfiddle.net/thHZ9/
如果要绝对定位元素,请确保将其放置在其右侧,而不是左侧:
#cool{
position:absolute;
right:10px;
top:10px;
...
}