react native中的文本垂直对齐(使用nativebase) [英] Text vertical align in react native (using nativebase)

查看:54
本文介绍了react native中的文本垂直对齐(使用nativebase)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道有一种方法可以在 React Native 中垂直对齐.我试图定位在底部,但我认为我找不到一个好的方法.

I was wondering there is a way I can align vertically in React Native. I'm trying to position on the bottom but I don't think I can find a good way to do it.

如果有人知道如何解决这个问题,请告诉我.

If anyone knows how to solve this issue, please let me know.

推荐答案

您可以使用 flex 属性、justifyContent 来实现此目的.完整文档此处.

You can use the flex property, justifyContent to achieve this. Full documentation here.

<View style={{justifyContent: 'center'}}>
   <Text>Vertically Centered Text</Text>
</View>

这篇关于react native中的文本垂直对齐(使用nativebase)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆