material-ui cookbook读书笔记-grid

<div className={classes.root}>
 <Grid container spacing={4}>
 <Grid item xs={12} sm={9} md={3}>
 <Paper className={classes.paper}>xs=12 sm=9 md=3</Paper>
 </Grid>
 <Grid item xs={12} sm={9} md={3}>
 <Paper className={classes.paper}>xs=12 sm=9 md=3</Paper>
 </Grid>
 <Grid item xs={12} sm={9} md={3}>
  <Paper className={classes.paper}>xs=12 sm=9 md=3</Paper>
 </Grid>
 <Grid item xs={12} sm={9} md={3}>
 <Paper className={classes.paper}>xs=12 sm=9 md=3</Paper>
 </Grid>
 </Grid>
</div>

断点属性

xs >= 0px
sm >= 600px
md >= 960px
lg >= 1280px
xl >= 1920px

断点属性xs sm md lg xl来决定grid的布局方式(相对于屏幕宽度来说),断点属性值是1-12;例如果屏幕宽度为575px,那么则使用xs断点,xs={12} 表示grid宽度与屏度宽度一致,如果xs={6}则表示grid的度宽与屏东幕的一半;如果屏幕宽度为725px,那么就使用sm断点布局sm={9}表示grid的宽度为屏幕的75%
附图:
在这里插入图片描述

在这里插入图片描述

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Over 66 hands-on recipes that cover UI development, animations, component architecture, routing, databases, testing, and debugging with React Today’s web demands efficient real-time applications and scalability. If you want to learn to build fast, efficient, and high-performing applications using React 16, this is the book for you. We plunge directly into the heart of all the most important React concepts for you to conquer. Along the way, you’ll learn how to work with the latest ECMAScript features. You’ll see the fundamentals of Redux and find out how to implement animations. Then, you’ll learn how to create APIs with Node, Firebase, and GraphQL, and improve the performance of our application with Webpack 4.x. You’ll find recipes on implementing server-side rendering, adding unit tests, and debugging. We also cover best practices to deploy a React application to production. Finally, you’ll learn how to create native mobile applications for iOS and Android using React Native. By the end of the book, you’ll be saved from a lot of trial and error and developmental headaches, and you’ll be on the road to becoming a React expert. What You Will Learn Gain the ability to wield complex topics such as Webpack and server-side rendering Implement an API using Node.js, Firebase, and GraphQL Learn to maximize the performance of React applications Create a mobile application using React Native Deploy a React application on Digital Ocean Get to know the best practices when organizing and testing a large React application

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值