
1.cover:(默认)
等比例填充image设定的宽高,图片可能会有裁剪:

2.stretch:
非等比例填充image设定的宽高,图片不会被裁剪,但可能会变形、拉伸:

3.contain:
等比例填充image设定的宽高,图片不会被裁剪,控件区域可能会有留白:

4.center:
图片原大小居中:

5.repeat:
图片原大小重复:

1.cover:(默认)
等比例填充image设定的宽高,图片可能会有裁剪:
2.stretch:
非等比例填充image设定的宽高,图片不会被裁剪,但可能会变形、拉伸:
3.contain:
等比例填充image设定的宽高,图片不会被裁剪,控件区域可能会有留白:
4.center:
图片原大小居中:
5.repeat:
图片原大小重复:
本文标题:react-native Image resizeMode 属性
本文链接:https://www.haomeiwen.com/subject/ztzedqtx.html
网友评论