跳到主要内容跳到主要内容

GlobalStylesAPI

React GlobalStyles 组件的 API 参考文档。了解此导出模块的 props、CSS 和其他 API。

演示

导入

import GlobalStyles from '@mui/material/GlobalStyles';
// or
import { GlobalStyles } from '@mui/material';

通过阅读此关于最小化 bundle size 的指南,了解两者之间的区别。

Props

原生组件的 Props 也可用。

名称类型描述
stylesarray
| func
| number
| object
| string
| bool

您想要全局应用的样式。

该组件不能持有 ref。

源代码

如果您在此页面中找不到信息,请考虑查看组件的实现以获取更多详细信息。