view组件中image图片?

小程序 文章 2020-08-25 11:21 641 0 全屏看文

AI助手支持GPT4.0

view组件中image图片?Image picture in the view component?

view组件中image图片?

一个view组件,其中包含一个image组件图片,图片周围有一定的空隙,怎么消除?

如图所示,红色为view组件,白色为image组件图片,组件图片设置为mode="widthFix",并设置 displa:block,也没什么用啊?


代码片段:https://developers.weixin.qq.com/s/PYiWBRma7Kjf


A view component contains an image component image. There is a certain gap around the image. How to eliminate it? As shown in the figure, red is the view component, white is the image component image, the component image is set to mode = "widthfix", and the display: block is also useless? Code fragment: https://developers.weixin.qq.com/s/PYiWBRma7Kjf

回答:

青团社:

widthFix会有222.5rpx这样的出现。你把它转为整数222rpx 就OK了

Admin²⁰²⁰:

木有问题啊?

จุ๊บ:

实测代码是可以的去除空白的,样式问题,将你的代码片段改成实际服务器图片,也是没问题啊

微喵网络:

代码片段没有复现问题

belief:怎么解决?
微喵网络:要复现才能去考虑怎么解决

-EOF-

AI助手支持GPT4.0