老师,请问jQuery怎么设置left和top?offset和position是不是只能读取

来源:3-11 修改元素样式(offset()、position()、scrollLeft())

慕粉2122407315

2017-08-21 14:17:04

jQuery怎么设置left和top?offset和position是不是只能读取

写回答

1回答

怎么都被占用了呢

2017-08-21

offset和position一般只用来获取数据,设置left和top值一般都通过css方法,例如:元素.css({ top: 10, left: 30 }),

0

0 学习 · 36712 问题

查看课程