Make an item stick to the bottom using flex in react-native

前端 未结 13 2300
别跟我提以往
别跟我提以往 2020-12-13 23:37

Suppose this is the layout:


    
        ...
        ...
    
             


        
13条回答
  •  温柔的废话
    2020-12-14 00:12

    In React Native, the default value of flexDirection is column (unlike in CSS, where it is row).

    Hence, in flexDirection: 'column' the cross-axis is horizontal and alignSelf works left/right.

    To pin your footer to the bottom, apply justifyContent: 'space-between' to the container

提交回复
热议问题