小编Var*_*nde的帖子

React Native 在 React Native iOS Android 中创建省略号剪切文本或如何在 React Native 中用点隐藏额外的文本

<Text style={styles.TextStyle}> 
  This is the Sample Ellipsis Text for Ellipsis from Start.This is the Sample Ellipsis Text for Ellipsis from Start.This is the Sample Ellipsis Text for Ellipsis from Start.
</Text>
Run Code Online (Sandbox Code Playgroud)

如果内容超出我需要显示的范围,我想使用点

html javascript frontend ellipsis react-native

5
推荐指数
1
解决办法
3422
查看次数

如何在react-native中组合多个内联样式对象和内联css?

如何在react-native中组合多个内联样式对象和内联css?

它有 3 个样式对象 TimelineGreenColor、TimelineLeftBorder、TimelineLeftLine 用于视图 div

  const stylesB = StyleSheet.create( {
     TimelineGreenColor:
     {
       backgroundColor: "green",
     },
     TimelineLeftBorder:
     {
       position: 'absolute',
       width: 4,
       backgroundColor: "green",
       height: '100%',
       left: 4,
       top: 15,
     },
     TimelineLeftCircle:
     {
       position: 'absolute',
       width: 12,
       height: 12,
       backgroundColor: "green",
       top: 12,
       borderRadius: 50,
       left: 0,
       /*boxShadow: "0px 0px 10px -2px black",*/
     },
     TimelineLeftLine:
     {
       position: 'absolute',
       width: 15,
       height: 3,
       backgroundColor: "green",
       top: 16,
       left: 5,
   }

   <View style={how to write styles in react-native ??????????}></View>
Run Code Online (Sandbox Code Playgroud)

css android styles stylesheet react-native

2
推荐指数
1
解决办法
3671
查看次数