【发布时间】:2017-09-12 09:51:18
【问题描述】:
如何获得如下图的内阴影。我正在使用下面的代码来获取外阴影。但是我怎样才能得到 Inner shadow 呢?提前致谢。
<View style={styles.searchBar}>
<TextInput
placeholder={'Suchen...'}
style={styles.inputSearch}
onChangeText={t => this.setState({ text: t })}
value={text}
onSubmitEditing={this.onSearch}
/>
<TouchableOpacity style={styles.clearButton} onPress={this.onClear}>
<Image source={Images.cancelSmall} />
</TouchableOpacity>
</View>
样式:
searchBar: {
flexDirection: 'row',
borderWidth: 0.1,
borderColor: 'grey',
flex: 1,
height: 40,
borderRadius: 40,
backgroundColor: '#fafafa',
shadowColor: 'rgba(0, 0, 0, 0.05)',
shadowOffset: {
width: 2,
height: 3
},
shadowRadius: 6,
shadowOpacity: 1
},
inputSearch: {
paddingLeft: 10,
height: 44,
flex: 1
}
【问题讨论】:
标签: css react-native