代码结构:
<cover-view class='parent'> <cover-image class='img'/> <cover-view class='txt'>测试文本</cover-view></cover-view> |
.parent{ height:24px; line-height: 24px; text-align: center; position: relative;}.img{ width:24px; height: 24px; display: inline-block; margin-right: 10px;}.txt{ font-size: 16px; font-weight: 400; font-family: PingFangSC-Regular,PingFangSC; display: inline-block; height: 24px;} |
iOS有问题,Android正常。
去掉图片后正常。

你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)
不过,讲道理line-height设置为height高度,inline-block应该居中的才对,为什么呢?