随笔分类 -  jQuery

摘要:对 jQuery 对象调用 position() 方法取得 left 和 top 后,left 和 top 取得的是 box 之间的相对位移。(即 margin 不会被加到 top 或 left 上)另外,外联 CSS 若放在 <script> 之后,在 chrome 上取得的 top 和 left 不稳定,在 FF 上取值稳定,和浏览器加载顺序有关,把 CSS 样式前置可避免问题。http://api.jquery.com/position/<!DOCTYPE html><html><head> <style> div { padd 阅读全文
posted @ 2012-07-12 23:21 lzhmqq 阅读(213) 评论(0) 推荐(0)