offset系列,client系列,scroll系列的含义及区分
offset系列,client系列,scroll系列的含义及区分
1.offset系列
offset元素的偏移量主要有offsetLeft,offsetTop,offsetWidth,offsetHeight四种模式
offsetTop: 盒子上边框距离页面顶部的距离
offsetLeft:盒子左边框距离页面左端的距离
offsetWidth:盒子的宽度(包括边框和内外边距)
offsetHeight:盒子的高度(包括边框和内外边距)
如:
<style>
* {
原创
2020-10-21 20:41:43 ·
362 阅读 ·
0 评论