【发布时间】:2016-05-26 05:14:22
【问题描述】:
有没有人有一个工作示例或解释 textAlign: 'justify' 如何在 React Native 中工作?也好奇textAlign: 'auto'
【问题讨论】:
标签: react-native
有没有人有一个工作示例或解释 textAlign: 'justify' 如何在 React Native 中工作?也好奇textAlign: 'auto'
【问题讨论】:
标签: react-native
实际上 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>
【讨论】:
我相信你唯一的 textAlign: react native 中的选项是 'center'、'flext-start' 和 'flex-end'
【讨论】: