我遵循的风格:
const styles = StyleSheet.create({
title: {
textDecorationLine: 'underline',
textDecorationStyle: 'solid',
textDecorationColor: '#000'
}
});
并将我的内容创建到某些文本组件中的下划线。但是这个下划线好像和用它装饰的文字太接近了。
我能以某种方式增加这个距离吗?
感谢您的帮助!
原文由 Alex Belets 发布,翻译遵循 CC BY-SA 4.0 许可协议
将你的
Text
包裹在View
中,其样式包含borderBottomWidth: 1
或任何你想要的厚度。给你的
Text
alineHeight
调整边框和内容之间的间距。如果您有多行文本,那么使用paddingBottom
也可以。就这么简单。请记住
View
边框将拉伸以包括View
本身的任何填充。