Why is there a gap between WeChat Mini Programs view tag and text tag?

<view style="height:24rpx;">
  <text style="font-size:24rpx;line-height:24rpx;">aaa</text>
</view>

in this way, in the simulator, the positions of the view tag and the text tag are staggered. There is a distance between the top of the text and the top of the view, and the text is not aligned with the upper left of the view. What is the reason and how to solve it?
(I tried to convert the text in the view tag into a block element, and the height of the view is highly consistent with that of the text. Some key layouts need to have several inline elements in the view on one line, such as an image image aligned with a paragraph of text, and cannot be turned into blocks. )

Try setting font-size to 0 in

view


layout. If there is too much inline-block, you might as well change to block, and float


you deserve to have ~

with display:flex,.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf81aa-30e16.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf81aa-30e16.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?