解决小程序rich-text渲染详情页面图片有间隙的问题

在开发中,我们会发现图片与图片之间有间隙
此时我的解决方法是:

将后端返回的数据为img标签添加style样式

res.info = res.info.replace(/<img /g,'<img style="display:block" ')

猜你喜欢

转载自blog.csdn.net/liaoxianhua888/article/details/124534600