跳转到内容

GlobalStyles API

想要学习更多组件属性和 CSS API,可以查阅 React GlobalStyles 组件的 API 文档。

演示项目

For examples and details on the usage of this React component, visit the component demo pages:

导入

import GlobalStyles from '@mui/material/GlobalStyles';
// 或
import { GlobalStyles } from '@mui/material';
你可以阅读这个关于最小化捆绑包的指南以了解以上二者的差异。

属性

原生(Native) 组件的属性也是可用的。

名称类型默认值描述
stylesfunc
| number
| object
| { __emotion_styles: any }
| string
| bool
The styles you want to apply globally.

组件无法持有 ref。