boundingClientRect 前言 前言 微信小程序 boundingClientRect 取不到值,在官方文档中有解决办法。 故代码如下: ready: function () { wx.createSelectorQuery().in(this).select('#id').boundingClientRect(function(res){ console.log(res) }).exec() }