jQuery_offset和position var offset = $('.xxx').offset() console.log(offset.left.,offset.top)xxx相对于页面左上角的位置 var position = $('.xxx').position() console.log(position.left,position.top)xxx相对于父元素左上角的位置 $('.xxx').offset({left:50, top:100})设置位置 jQuery_scrol…
index.jsp <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd&quo…