在 Tailwind 中,这是我响应式更改字体大小的方式:
<div className="text-xl sm:text-4xl">Hello World</div>
在 Material UI 中,它使用的是排版,如何响应性地更改文本大小?例如,在 sm 及以上使用 h3。
<Typography variant="h1" component="h1">
Hello World
</Typography>
答案 0 :(得分:0)
您可以利用 Material UI 提供的媒体查询和断点来设置所需的字体大小 w.r.t 屏幕大小。
更多信息在这里:Material UI - Responsive Fonts