Make view 80% width of parent in React Native

后端 未结 10 2107
孤城傲影
孤城傲影 2020-12-12 16:49

I\'m creating a form in React Native and would like to make my TextInputs 80% of the screen width.

With HTML and ordinary CSS, this would be straightfor

10条回答
  •  爱一瞬间的悲伤
    2020-12-12 17:20

    Just add quotes around the size in your code. Using this you can use percentage in width, height

    input: {
        width: '80%'
    }
    

提交回复
热议问题