如何更改本机下划线的厚度

问题描述 投票:0回答:2

我已经使用反应式本机了几周了,我一直停留在某个时候。我有一段文字,并带有下划线。但是我需要使下划线的厚度更大,以便清晰可见。我试图找到解决方案,但没有得到任何解决方案。有人可以帮我吗?

我的代码如下。 :

<Text style={{textDecorationLine: 'underline'}}>Underlined Text</Text>
javascript css react-native stylesheet
2个回答
0
投票
<TextInput style={styles.textInput}/>


const styles = StyleSheet.create({ 
  textInput: {

    borderBottomColor: '#000', // Add this to specify bottom border color
    borderBottomWidth:  10   // Add this to specify bottom border thickness
}
});


0
投票

下划线文字

const styles = StyleSheet.create(
{
  Container:  
  {
    justifyContent: 'center',
    flex: 1,
  },
  TextStyle: 
  {
    textAlign: 'center',
    fontSize: 20,
    textDecorationLine: 'underline',
   }
}
© www.soinside.com 2019 - 2024. All rights reserved.