ant-design/components/back-top/demo/basic.md

43 lines
550 B
Markdown
Raw Normal View History

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.
```tsx
2016-06-23 23:12:18 +08:00
import { BackTop } from 'antd';
2022-05-23 14:37:16 +08:00
import React from 'react';
2016-06-23 23:12:18 +08:00
const App: React.FC = () => (
<>
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.
</>
2016-10-30 12:43:59 +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>