Reactjs 材质ui响应网格:如何对齐左右列以在移动设备上移动到中列上方
我有3个网格项(见下面的代码);在移动设备上,我希望左侧和右侧网格项目显示在中间网格项目的上方,在平板电脑视图上,我希望它们显示在中间网格项目的上方,并且彼此相邻。我如何做到这一点 我正在使用:Reactjs 材质ui响应网格:如何对齐左右列以在移动设备上移动到中列上方,reactjs,material-ui,Reactjs,Material Ui,我有3个网格项(见下面的代码);在移动设备上,我希望左侧和右侧网格项目显示在中间网格项目的上方,在平板电脑视图上,我希望它们显示在中间网格项目的上方,并且彼此相邻。我如何做到这一点 我正在使用: 通过滚动大量堆栈溢出页面,我最终找到了答案;我就是这样实现的:) 通过滚动大量堆栈溢出页面,我最终找到了答案;我就是这样实现的:) 别忘了导入:从“@material ui/core/Box”导入框;别忘了导入:从“@material ui/core/Box”导入框; <Grid
通过滚动大量堆栈溢出页面,我最终找到了答案;我就是这样实现的:)
通过滚动大量堆栈溢出页面,我最终找到了答案;我就是这样实现的:)
别忘了导入:从“@material ui/core/Box”导入框;别忘了导入:从“@material ui/core/Box”导入框;
<Grid item xs={12} md={3} sm={6}>
<ProductList
productgroup={this.state.product.group}
productnumber={this.state.product.number}
handleProductSelect={this.handleProductSelect}
productlist={this.props.productlist}
theme={this.props.selectedTheme} />
</Grid>
<Grid item xs={12} md={6} sm={12}>
<TableProduct product={this.state.product} parameters={this.state.parameters} />
</Grid>
<Grid item xs={12} md={3} sm={6}>
<ParameterSelect product={this.state.product} parameters={this.state.parameters} onChange={this.handleInputChange} />
</Grid>
</Grid>
<Grid container direction="row" justify="center" alignItems="center" spacing={3} className={classes.gridWidth}>
<Box clone order={{ xs: 1, sm: 1, md: 1 }}>
<Grid item xs={12} md={3} sm={6}>
<ProductList
productgroup={this.state.product.group}
productnumber={this.state.product.number}
handleProductSelect={this.handleProductSelect}
productlist={this.props.productlist}
theme={this.props.selectedTheme} />
</Grid>
</Box>
<Box clone order={{ xs: 3, sm: 3, md: 2 }}>
<Grid item xs={12} md={6} sm={12}>
<TableProduct product={this.state.product} parameters={this.state.parameters} />
</Grid>
</Box>
<Box clone order={{ xs: 2, sm: 2, md: 3}}>
<Grid item xs={12} md={3} sm={6}>
<ParameterSelect product={this.state.product} parameters={this.state.parameters} onChange={this.handleInputChange} />
</Grid>
</Box>
</Grid>