在 react-native 中将组件高度设置为 100% [英] Setting component height to 100% in react-native
本文介绍了在 react-native 中将组件高度设置为 100%的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以给出样式数值的高度元素,例如 40
但这些值必须是整数.如何让我的组件具有 100%
的高度?
I can give the height element of style numeric values such as 40
but these are required to be integers. How can I make my component to have a height of 100%
?
推荐答案
查看 flexbox文档.在样式表中,使用:
check out the flexbox doc. in the stylesheet, use:
flex:1,
这篇关于在 react-native 中将组件高度设置为 100%的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文