简体   繁体   中英

why outline css property not working in react-native?

I can not see outline border and colour in native version of the application , meanwhile it works okay with web application,

            backgroundColor: '#065B61',
            marginRight: -20,
            shadowColor: "black",
            shadowOffset: { width: 0, height: 2 },
            shadowOpacity: 1,
            shadowRadius: 4.00,
            elevation: 24,
            marginBottom: 15,
            outlineWidth: 10,
            outlineStyle: "auto",
            outlineColor: 'white',
        }
    }

Not all css properties are supported in React Native. They might work on web but non on native devices. List of supported View style props . You can see there are no outline props. The solution is to use border props, borderWidth , borderStyle & borderColor -

borderColor: 'black',
borderStyle: 'solid',
borderWidth: 3

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM