const query = uni.createSelectorQuery().in(this); Query.select ('.sub-ff').boundingClientRect(data => {console.log(" get layout location information "+ json.stringify (data)); Console. log(" distance of node from top of page is + data.top); }).exec();Copy the code