style.posLeft不需要单位,而style.left需要单位。
js代码
页面div:
附链接:http://blog.sina.com.cn/s/blog_6a2df1d40100ulgw.html