AB are elastic layouts
A distance B minimum 20
A can compress B
B minimum 30
AB is located at both ends of the horizontal
how to implement this layout with flexbox?
as shown in the figure:
AB are elastic layouts
A distance B minimum 20
A can compress B
B minimum 30
AB is located at both ends of the horizontal
how to implement this layout with flexbox?
as shown in the figure:
<div classNames="container">
<div className="a">A</div>
<div className="c"></div>
<div className="b">B</div>
</div>
.container{
display:flex;
flex-direction:row;
justify-content:center;
align-item:space-between;
}
.a{
flex:1 1 30px;
}
.b{
flex:1 1 30px;
}
.c{
width:20px;
}
roughly like this, adding an empty 20px div, in the middle is just an idea. Maybe some attributes are not written correctly, so don't worry about it
render(){
let leftcontent1 = "React NativeFlexbox";
let leftcontent2 = "H";
let rightcontent = "";
return <View style={{flex:1, alignItems:'center'}}>
<TouchableOpacity style={styles.button} activeOpacity={0.8} onPress={this.test.bind(this,3,4)}>
<Text>test </Text>
</TouchableOpacity>
<TouchableOpacity style={styles.button} activeOpacity={1} onPress={()=>{this.testB(3,4)}}>
<Text>testB</Text>
</TouchableOpacity>
<View style={{flex:1,width:"100%",flexDirection:'row',justifyContent:"space-between"}}>
<View style={[styles.item,{minWidth: 30,flexShrink:2}]}>
<Text>{leftcontent1}</Text>
</View>
<View style={[styles.item,{minWidth: 30,marginLeft: 20,}]}>
<Text>{rightcontent}</Text>
</View>
</View>
</View>
}
Previous: What is the purpose of dev.env.js and prod.env.js configuration files?
Next: There is a problem of read repetition in LOCK TABLES auto_table WRITE;.
-
False
-
Django, Why does the system automatically generate an empty session? every time the request is made?
-
Use python to convert dict1 to dict2, in the example. I tried for a long time but couldn't find a solution.
-
How to self-start the php-fpm service when building a LNMP environment with docker?
-
Can an array in react state be bound to a dom state using an element in the array?
-
Wechat browser version 6.6.5 cannot prevent the springback of pull-up and drop-down to the top under ios system.
-
In express+hbs, how do you define the routed data as a variable on the page?
-
How to use symbol reference of Iconfont in dva
-
How to elegantly add data to JSON objects?
-
Using node to build video streaming server
-
The proportional width of the echarts graph is inconsistent.
-
React uses axios to call the background data. After success, how to jump to the page based on the returned value?
-
I don't understand what a linux command means. Please explain it.
-
Vue introduces multiple components in vue-router by nesting named views, and does not refresh the same reference in other pages.
-
Running nodejs reports fewer errors ")"
-
ElementUI table component form Table-column fixed form dislocation
-
How does the vue child component manipulate the data of the parent component?
-
There is a "warehouse path" does not appear to be a git repository problem with the push code on Aliyun code?
-
How to hide the bottom prompt field of ueditor?
-
How to use input type= "file" to choose the path to download locally?
Menu