2016-06-23 23:12:18 +08:00
|
|
|
---
|
|
|
|
order: 0
|
2016-09-21 11:28:38 +08:00
|
|
|
title:
|
2016-07-11 11:40:20 +08:00
|
|
|
zh-CN: 基本
|
|
|
|
en-US: Basic
|
2016-06-23 23:12:18 +08:00
|
|
|
---
|
|
|
|
|
2016-07-11 11:40:20 +08:00
|
|
|
## zh-CN
|
|
|
|
|
2016-06-24 13:53:19 +08:00
|
|
|
最简单的用法。
|
2016-06-23 23:12:18 +08:00
|
|
|
|
2016-07-11 11:40:20 +08:00
|
|
|
## en-US
|
|
|
|
|
|
|
|
The most basic usage.
|
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
```tsx
|
2016-06-23 23:12:18 +08:00
|
|
|
import { BackTop } from 'antd';
|
2022-05-21 22:14:15 +08:00
|
|
|
import React from 'react';
|
2016-06-23 23:12:18 +08:00
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
const App: React.FC = () => (
|
2020-04-01 17:38:21 +08:00
|
|
|
<>
|
2016-06-24 13:53:19 +08:00
|
|
|
<BackTop />
|
2016-11-11 16:28:10 +08:00
|
|
|
Scroll down to see the bottom-right
|
2019-12-25 19:30:58 +08:00
|
|
|
<strong className="site-back-top-basic"> gray </strong>
|
2016-11-11 16:28:10 +08:00
|
|
|
button.
|
2022-04-03 23:27:45 +08:00
|
|
|
</>
|
2016-10-30 12:43:59 +08:00
|
|
|
);
|
2022-05-19 09:46:26 +08:00
|
|
|
|
|
|
|
export default App;
|
2019-05-07 14:57:32 +08:00
|
|
|
```
|
2019-12-25 19:30:58 +08:00
|
|
|
|
|
|
|
```css
|
|
|
|
.site-back-top-basic {
|
|
|
|
color: rgba(64, 64, 64, 0.6);
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
<style>
|
|
|
|
[data-theme="dark"] .site-back-top-basic {
|
|
|
|
color: rgba(255,255,255,.45);
|
|
|
|
}
|
|
|
|
</style>
|