Код: Выделить всё
//import liraries
import React, { Component } from 'react';
import { View, Text, StyleSheet, Image } from 'react-native';
// create a component
class Login extends Component {
render() {
const imageURL = require('./images/CircleLogo.png');
return (
);
}
}
// define your styles
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: 'aliceblue',
},
loginContainer:{
alignItems: 'center',
flexGrow: 1,
justifyContent: 'center'
},
logo: {
position: 'absolute',
width: '70vw',
height: '70vw',
maxWidth: 300
}
});
//make this component available to the app
export default Login;
Примечание. Похоже, React принимает проценты, как видно, что я могу вернуться. Но мой вопрос относится к измерениям VW и VH .
Подробнее здесь: https://stackoverflow.com/questions/524 ... act-native
Мобильная версия