![React Material:UI Cookbook](https://wfqqreader-1252317822.image.myqcloud.com/cover/718/36698718/b_36698718.jpg)
上QQ阅读APP看书,第一时间看更新
There's more...
You can combine different widths in a fixed way. For example, you could have header and footer Grid items that use a full-width layout, while the Grid items in between use two columns:
<div className={classes.root}>
<Grid container spacing={4}>
<Grid item xs={12}>
<Paper className={classes.paper}>xs=12</Paper>
</Grid>
<Grid item xs={6}>
<Paper className={classes.paper}>xs=6</Paper>
</Grid>
<Grid item xs={6}>
<Paper className={classes.paper}>xs=6</Paper>
</Grid>
<Grid item xs={6}>
<Paper className={classes.paper}>xs=6</Paper>
</Grid>
<Grid item xs={6}>
<Paper className={classes.paper}>xs=6</Paper>
</Grid>
<Grid item xs={6}>
<Paper className={classes.paper}>xs=6</Paper>
</Grid>
<Grid item xs={6}>
<Paper className={classes.paper}>xs=6</Paper>
</Grid>
<Grid item xs={12}>
<Paper className={classes.paper}>xs=12</Paper>
</Grid>
</Grid>
</div>
The first and last Grid components have an xs value of 12 (100%), while the other Grid items have xs values of 6 (50%) for a two-column layout. Here's what the result looks like at a pixel width of 725:
![](https://epubservercos.yuewen.com/E00FB0/19470380001496806/epubprivate/OEBPS/Images/aa8f6e9e-1b0c-44a4-8bcb-56ca6b6ef0d8.png?sign=1738782650-8yy8kkQhP2J11Qize2FVHTi5ghXsXkzz-0-7e98ac0fc3088d8fa444ec1905ec1e1b)