一个view组件,其中包含一个image组件图片,图片周围有一定的空隙,怎么消除?
如图所示,红色为view组件,白色为image组件图片,组件图片设置为mode="widthFix",并设置 displa:block,也没什么用啊?
代码片段:https://developers.weixin.qq.com/s/PYiWBRma7Kjf
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
回答:
木有问题啊?
实测代码是可以的去除空白的,样式问题,将你的代码片段改成实际服务器图片,也是没问题啊
代码片段没有复现问题
原文出处:view组件中image图片?
widthFix会有222.5rpx这样的出现。你把它转为整数222rpx 就OK了