[英]How to use breakpoints for theme spacing in material-ui
Is there way to define theme spacing using breakpoints?有没有办法使用断点定义 主题间距? Something like就像是
spacing: {
[defaultTheme.breakpoints.down('sm')]: 4
[defaultTheme.breakpoints.up('sm')]: 8
...
}
Or like it's done in typography或者就像在排版中所做的那样
I know I can use rem
, but that does not suits me我知道我可以使用rem
,但这不适合我
You can try using this:你可以尝试使用这个:
spacing: calc(100vw / x);
x will be a number like 70 for example.例如,x 将是一个类似 70 的数字。
It will update itself with screen resizing.它将通过调整屏幕大小进行自我更新。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.