2016-11-09 14:22:38 +08:00
|
|
|
---
|
|
|
|
order: 2
|
|
|
|
title:
|
2017-10-11 12:01:27 +08:00
|
|
|
zh-CN: 静态位置
|
|
|
|
en-US: Static Anchor
|
2016-11-09 14:22:38 +08:00
|
|
|
---
|
|
|
|
|
|
|
|
## zh-CN
|
|
|
|
|
2016-11-09 21:06:43 +08:00
|
|
|
不浮动,状态不随页面滚动变化。
|
2016-11-09 14:22:38 +08:00
|
|
|
|
|
|
|
## en-US
|
|
|
|
|
|
|
|
Do not change state when page is scrolling.
|
|
|
|
|
2017-02-13 10:55:53 +08:00
|
|
|
```jsx
|
2016-11-09 14:22:38 +08:00
|
|
|
import { Anchor } from 'antd';
|
2018-06-27 15:55:04 +08:00
|
|
|
|
2016-11-09 14:22:38 +08:00
|
|
|
const { Link } = Anchor;
|
|
|
|
|
|
|
|
ReactDOM.render(
|
|
|
|
<Anchor affix={false}>
|
|
|
|
<Link href="#components-anchor-demo-basic" title="Basic demo" />
|
2019-01-09 23:40:47 +08:00
|
|
|
<Link href="#components-anchor-demo-static" title="Static demo" />
|
2016-11-09 15:26:56 +08:00
|
|
|
<Link href="#API" title="API">
|
|
|
|
<Link href="#Anchor-Props" title="Anchor Props" />
|
|
|
|
<Link href="#Link-Props" title="Link Props" />
|
|
|
|
</Link>
|
2018-06-27 15:55:04 +08:00
|
|
|
</Anchor>,
|
2019-05-07 14:57:32 +08:00
|
|
|
mountNode,
|
2018-11-28 15:00:03 +08:00
|
|
|
);
|
2016-11-09 14:22:38 +08:00
|
|
|
```
|