Как использовать VW и VH CSS с Native NativeCSS

Разбираемся в CSS
Anonymous
Как использовать VW и VH CSS с Native Native

Сообщение Anonymous »

Я создаю базовый вход в систему с использованием react native < /code> с логотипом и 2 входами: < /p>

Код: Выделить всё

//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;
Как вы можете видеть, я использую vw и vh измерения CSS. Измерения? < /strong> < /p>

Примечание. Похоже, React принимает проценты, как видно, что я могу вернуться. Но мой вопрос относится к измерениям VW и VH .

Подробнее здесь: https://stackoverflow.com/questions/524 ... act-native

Вернуться в «CSS»