2016-11-09 14:22:38 +08:00
|
|
|
---
|
|
|
|
order: 2
|
|
|
|
title:
|
|
|
|
zh-CN: 固定
|
|
|
|
en-US: Fixed Anchor
|
|
|
|
---
|
|
|
|
|
|
|
|
## 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-01-19 15:19:03 +08:00
|
|
|
```__react
|
2016-11-09 14:22:38 +08:00
|
|
|
import { Anchor } from 'antd';
|
|
|
|
const { Link } = Anchor;
|
|
|
|
|
|
|
|
ReactDOM.render(
|
|
|
|
<Anchor affix={false}>
|
|
|
|
<Link href="#components-anchor-demo-basic" title="Basic demo" />
|
2016-11-09 21:06:43 +08:00
|
|
|
<Link href="#components-anchor-demo-fixed" title="Fixed 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>
|
2016-11-09 14:22:38 +08:00
|
|
|
</Anchor>
|
|
|
|
, mountNode);
|
|
|
|
```
|