微信小程序获取元素的高度宽度

2020-02-06  本文已影响0人  Hi小胡
var query = wx.createSelectorQuery();
query.select('.box').boundingClientRect(function (rect) {
  console.log(rect.width)
  console.log(rect.height)
}).exec();
上一篇 下一篇

猜你喜欢

热点阅读