var query = wx.createSelectorQuery();
//选择id
query.select('.demo').boundingClientRect(function (rect) {
console.log(rect)
}).exec();
.demo is the css name of the element, pay attention to avoid duplication
var query = wx.createSelectorQuery();
//选择id
query.select('.demo').boundingClientRect(function (rect) {
console.log(rect)
}).exec();
.demo is the css name of the element, pay attention to avoid duplication