了解offsetParent 1.当有定位父级时,则offsetParent是指当前元素最近的一个定位父级 2.在没有定位父级 (1)自身没有定位的情况下,各浏览器默认的offsetParent指body (2)自身有定位的情况下,ie7、ie6默认默认的offsetparent指html Read More
posted @ 2016-08-01 18:07 楚秦 Views(238) Comments(0) Diggs(0)
关于offsetTop、offsetLeft的小心得,如有错误,敬请指出,共勉,谢谢。 1.当有定位父级时 (1)当前元素有定位时,offsetTop、offsetLeft 指当前元素到最近定位父级的偏移量 (2)当前元素没有定位时,在ie6、ie7下,指到body的偏移量,其他浏览器同上 2.当没 Read More
posted @ 2016-08-01 18:05 楚秦 Views(237) Comments(0) Diggs(0)
1.当有定位父级时 (1)当前元素有定位时,offsetTop、offsetLeft 指当前元素到最近定位父级的偏移量 (2)当前元素没有定位时,在ie6、ie7下,指到body的偏移量,其他浏览器同上 2.当没有定位父级时,offsetTop、offsetLeft 可以理解为到当前元素的offse Read More
posted @ 2016-08-01 18:00 楚秦 Views(79) Comments(0) Diggs(0)
一点小小的心得,如有错误敬请指出,共勉。 1.当有定位父级时,则offsetParent是指当前元素最近的一个定位父级 2.在没有定位父级 (1)自身没有定位的情况下,各浏览器默认的offsetParent指body (2)自身有定位的情况下,ie7、ie6默认默认的offsetparent指htm Read More
posted @ 2016-08-01 17:58 楚秦 Views(118) Comments(0) Diggs(0)