Javascript 设置下划线长度
我想设置下划线的长度,你知道我该怎么做吗 这个下划线的长度取决于单词的长度,我会设置这个维度Javascript 设置下划线长度,javascript,react-native,Javascript,React Native,我想设置下划线的长度,你知道我该怎么做吗 这个下划线的长度取决于单词的长度,我会设置这个维度 View style={consumer.body}> <View style={consumer.bodyInputs}> <TextInput style={consumer.inputs} placeholder="Codice Fiscale"
View style={consumer.body}>
<View style={consumer.bodyInputs}>
<TextInput
style={consumer.inputs}
placeholder="Codice Fiscale"
keyboardType="default"
underlineColorAndroid="grey"
onChangeText={value => {
//code...
}
}
/>
</View>
一个简单的方法是使用空的
。见下例:
<View style={styles.body}>
<View style={styles.bodyInputs}>
<TextInput
style={styles.inputs}
placeholder="Codice Fiscale"
keyboardType="default"
underlineColorAndroid="grey"
/>
// here we create your bottom border
<View style={{width: 80, height: 1, backgroundColor: '#000'}}/>
</View>
</View>
//在这里,我们创建您的底部边框
输出:
工作零食:
一个简单的方法是使用空的
。见下例:
<View style={styles.body}>
<View style={styles.bodyInputs}>
<TextInput
style={styles.inputs}
placeholder="Codice Fiscale"
keyboardType="default"
underlineColorAndroid="grey"
/>
// here we create your bottom border
<View style={{width: 80, height: 1, backgroundColor: '#000'}}/>
</View>
</View>
//在这里,我们创建您的底部边框
输出:
工作零食: