有没有人对textAlign: 'justify'在React Native中的工作原理有一个有效的例子或解释?我对textAlign: 'auto'也很好奇
发布于 2019-02-19 16:22:10
事实上,在android操作系统中,react native并不支持对齐文本。唯一的方法是使用Webview react原生标签,如下所示:
<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>发布于 2016-05-28 05:52:32
我相信您在react原生中唯一的textAlign:选项是‘textAlign’,'flext-start‘和'flex-end’
https://stackoverflow.com/questions/37452111
复制相似问题