老师,请问jQuery怎么设置left和top?offset和position是不是只能读取
来源:3-11 修改元素样式(offset()、position()、scrollLeft())
慕粉2122407315
2017-08-21 14:17:04
jQuery怎么设置left和top?offset和position是不是只能读取
1回答
offset和position一般只用来获取数据,设置left和top值一般都通过css方法,例如:元素.css({ top: 10, left: 30 }),
相似问题