gpt4 book ai didi

react-native - 文本对齐示例 : 'justify'

转载 作者:行者123 更新时间:2023-12-05 08:12:58 26 4
gpt4 key购买 nike

有没有人有关于 textAlign: 'justify' 在 React Native 中如何工作的工作示例或解释?也对 textAlign: 'auto'

感到好奇

最佳答案

事实上,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>

关于react-native - 文本对齐示例 : 'justify' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37452111/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com