2016-06-28 19 views
12

Sto cercando di implementare l'ombra interna della scatola simile a ciò che è possibile ottenere usando box-shadow: inserto in CSS. Ho provato quanto segue, ma non riesco a ottenere l'ombra più prominente e più scura. https://rnplay.org/apps/EHvL4gbox-shadow: inset per react-native

var styles = StyleSheet.create({ 
    container: { 
    flex: 1, 
    }, 
    box: { 
    margin: 20, 
    flex: 1, 
    backgroundColor: 'transparent', 
    borderColor: 'white', 
    borderWidth: 1, 
    overflow: 'hidden', 
    shadowColor: 'black', 
    shadowRadius: 10, 
    shadowOpacity: 1, 
    }, 
}); 

risposta

1

Aumentare il bordo.

box: { 
margin: 10, 
flex: 1, 
backgroundColor: 'transparent', 
borderColor: 'white', 
borderWidth: 30, 
overflow: 'hidden', 
shadowColor: 'black', 
shadowRadius: 10, 
shadowOpacity: 1, 
} 

enter image description here

Problemi correlati