React Native Flexbox – не работает, элементы выравниваются по одному столбцу ⇐ CSS
-
Anonymous
React Native Flexbox – не работает, элементы выравниваются по одному столбцу
I am looking to design a home page with 2-3 "images" per row but when I add a flexbox setting nothing really changes. The images are just aligning all in one column. What am I doing wrong? I have used this tutorial for reference: https://reactnative.dev/docs/flexbox?la ... javascript
I have tried setting the flex direction and the flex number but it doesn't change anything. I have also tinkered with the css but still nothing.
import { StatusBar } from "expo-status-bar"; import { ImageBackground, StyleSheet, Text, View, Image, SafeAreaView, ScrollView, } from "react-native"; export default function App() { return ( LOGOTYPE HERE ); } const styles = StyleSheet.create({ background: { flex: 2, resizeMode: "cover", // or 'stretch' or 'contain' }, container: { flex: 2, padding: 40, }, });
Источник: https://stackoverflow.com/questions/780 ... one-column
I am looking to design a home page with 2-3 "images" per row but when I add a flexbox setting nothing really changes. The images are just aligning all in one column. What am I doing wrong? I have used this tutorial for reference: https://reactnative.dev/docs/flexbox?la ... javascript
I have tried setting the flex direction and the flex number but it doesn't change anything. I have also tinkered with the css but still nothing.
import { StatusBar } from "expo-status-bar"; import { ImageBackground, StyleSheet, Text, View, Image, SafeAreaView, ScrollView, } from "react-native"; export default function App() { return ( LOGOTYPE HERE ); } const styles = StyleSheet.create({ background: { flex: 2, resizeMode: "cover", // or 'stretch' or 'contain' }, container: { flex: 2, padding: 40, }, });
Источник: https://stackoverflow.com/questions/780 ... one-column
Мобильная версия