[Flexbox] Use Flex to Scale Background Image
to use Image flex background scale Flexbox
2023-09-14 08:59:19 时间
In this lesson we will use Flexbox to scale a background image to fit on the screen of our React Native application.
import React, { Component } from 'react'; import {AppRegistry, StyleSheet, Text, View, Image} from 'react-native'; export default class general extends Component { render() { return ( <Image source={require("./cat.jpg")} style={styles.container}> <Text>A good looking cat</Text> </Image> ); } } const styles = StyleSheet.create({ container: { flex: 1, width: null, height: null, alignItems: "center", justifyContent: "center" } }) AppRegistry.registerComponent('general', () => general);
相关文章
- 独家 | 是时候和pd.read_csv(), pd.to_csv()说再见了
- To add browser notifications to an online customer support live chat service system - gofly - self h
- SAP UI5 表格 Click to Select 文本的来源
- ORA-00409: COMPATIBLE needs to be string or higher to use AUTO SEGMENT SPACE MANAGEMENT ORACLE 报错 故障修复 远程处理
- ORA-00609: could not attach to incoming connection ORACLE 报错 故障修复 远程处理
- ORA-19884: datafile string is unable to use Unused Block Optimization because tablespace has been dropped ORACLE 报错 故障修复 远程处理
- ORA-22375: Event to check for subtypes in complete type tree ORACLE 报错 故障修复 远程处理
- ORA-27134: unable to set stacksize ORACLE 报错 故障修复 远程处理
- ORA-40107: operation requires string option to be installed ORACLE 报错 故障修复 远程处理
- MySQL Error number: 3724; Symbol: ER_UNABLE_TO_SET_OPTION; SQLSTATE: HY000 报错 故障修复 远程处理
- MySQL Error number: MY-010427; Symbol: ER_RPL_SLAVE_FAILED_TO_INIT_MASTER_INFO_STRUCTURE; SQLSTATE: HY000 报错 故障修复 远程处理
- MySQL Error number: MY-011294; Symbol: ER_XPLUGIN_UNABLE_TO_USE_USER_SESSION_ACCOUNT; SQLSTATE: HY000 报错 故障修复 远程处理
- MySQL Error number: MY-011434; Symbol: ER_KEYRING_AWS_FAILED_TO_RESTORE_FROM_BACKUP_FILE; SQLSTATE: HY000 报错 故障修复 远程处理
- MySQL Error number: MY-011664; Symbol: ER_GRP_RPL_FAILED_TO_UNREGISTER_BINLOG_STATE_OBSERVER; SQLSTATE: HY000 报错 故障修复 远程处理
- ORA-07469: sppst: mclear error, unable to clear semaphore. ORACLE 报错 故障修复 远程处理
- ORA-10657: Lob column to be shrunk does not exist ORACLE 报错 故障修复 远程处理
- ORA-10873: file string needs to be either taken out of backup mode or media recovered ORACLE 报错 故障修复 远程处理
- ORA-12317: logon to database (link name string) denied ORACLE 报错 故障修复 远程处理
- ORA-14450: attempt to access a transactional temp table already in use ORACLE 报错 故障修复 远程处理
- php SSL certificate problem: unable to get local issuer certificate详解编程语言
- How to Configure Your Linux System to Use DHCPC for Dynamic IP Address Management(linuxdhcpc)
- How to Use MySQL SEQ to Create Custom Sequences for Your Database(mysqlseq)