ant-design/components/spin/demo/inside.md

45 lines
551 B
Markdown
Raw Normal View History

2016-03-31 09:40:55 +08:00
---
order: 2
2019-05-07 14:57:32 +08:00
title:
zh-CN: 容器
en-US: Inside a container
2016-03-31 09:40:55 +08:00
---
2015-10-31 02:00:03 +08:00
## zh-CN
2015-10-31 02:00:03 +08:00
放入一个容器中。
## en-US
Spin in a container.
```tsx
2015-10-31 02:00:03 +08:00
import { Spin } from 'antd';
2022-05-23 14:37:16 +08:00
import React from 'react';
2015-10-31 02:00:03 +08:00
const App: React.FC = () => (
2015-10-31 02:00:03 +08:00
<div className="example">
<Spin />
</div>
2018-11-28 15:00:03 +08:00
);
export default App;
2019-05-07 14:57:32 +08:00
```
2015-10-31 02:00:03 +08:00
2019-05-07 14:57:32 +08:00
```css
2015-10-31 02:00:03 +08:00
.example {
margin: 20px 0;
margin-bottom: 20px;
padding: 30px 50px;
2015-10-31 02:00:03 +08:00
text-align: center;
2019-05-07 14:57:32 +08:00
background: rgba(0, 0, 0, 0.05);
2015-10-31 02:00:03 +08:00
border-radius: 4px;
}
2019-05-07 14:57:32 +08:00
```
2019-12-24 20:58:42 +08:00
<style>
.example {
background: rgba(255,255,255,0.08);
}
</style>