如何设置webview高以自动响应本机?

时间:2018-12-10 11:11:19

标签: css react-native

const styles = StyleSheet.create({
    viewQuestion: {
        flex: 1,
        flexDirection: 'row'
    },
    question: {
        flex: 1,
        margin: 5
    }
});

    <View style={styles.viewQuestion} resizeMode={'contain'}>
         <Text style={{fontSize: 17, margin: 10, color: '#000'}}>{this.state.pointer}</Text>
         <WebView source={{html: this.state.item}} style={styles.question}/>
    </View>

我使用flex: 1设置了视图和Web视图,但是它不起作用。如何将网络视图高度设置为auto?我也将height: 'auto'设置为webview样式,但这并不奏效,帮助和感谢

0 个答案:

没有答案