How to create text border in React Native?

前端 未结 9 1729
清歌不尽
清歌不尽 2021-02-01 14:14

In React-Native, how do I add font borders to Text-components?

I\'ve tried using border and shadow{Color, Radius, Opacity, Offset}, but haven\'

9条回答
  •  天命终不由人
    2021-02-01 14:41

    you can emulator border as two attributes :

    textShadowColor color
    textShadowOffset {width: number, height: number}
    

    Ex:

    textshadow:{
        fontSize:100,
        color:'#FFFFFF',
        fontFamily:'Times New Roman',
        paddingLeft:30,
        paddingRight:30,
        textShadowColor:'#585858',
        textShadowOffset:{width: 5, height: 5},
        textShadowRadius:10,
      },

提交回复
热议问题