【问题标题】:Example of textAlign: 'justify'textAlign 示例:'justify'
【发布时间】:2016-05-26 05:14:22
【问题描述】:

有没有人有一个工作示例或解释 textAlign: 'justify' 如何在 React Native 中工作?也好奇textAlign: 'auto'

【问题讨论】:

    标签: react-native


    【解决方案1】:

    实际上 react native 不支持 android OS 中的文本对齐对齐。唯一的方法是使用 Webview react native 标签如下:

    <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>
    

    【讨论】:

      【解决方案2】:

      我相信你唯一的 textAlign: react native 中的选项是 'center'、'flext-start' 和 'flex-end'

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2021-05-07
        • 1970-01-01
        • 1970-01-01
        • 2022-10-13
        • 2011-07-26
        • 1970-01-01
        • 1970-01-01
        • 2018-07-10
        相关资源
        最近更新 更多