首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >textAlign示例:'justify‘

textAlign示例:'justify‘
EN

Stack Overflow用户
提问于 2016-05-26 13:14:22
回答 2查看 834关注 0票数 3

有没有人对textAlign: 'justify'在React Native中的工作原理有一个有效的例子或解释?我对textAlign: 'auto'也很好奇

EN

回答 2

Stack Overflow用户

发布于 2019-02-19 16:22:10

事实上,在android操作系统中,react native并不支持对齐文本。唯一的方法是使用Webview react原生标签,如下所示:

代码语言:javascript
复制
<View style={  flex: 1,height: 500}}}>
        <WebView
          source={{
            html:
              "<style>p{text-align:justify}</style>" +
              "<p>" +
              "Lorem Ipsum is sim and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum" +
              "</p>"
          }}
        />
      </View>
票数 0
EN

Stack Overflow用户

发布于 2016-05-28 05:52:32

我相信您在react原生中唯一的textAlign:选项是‘textAlign’,'flext-start‘和'flex-end’

票数 -3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37452111

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档