Skip to content

Commit

Permalink
translated doc of affix target demo (ant-design#2817)
Browse files Browse the repository at this point in the history
* translated doc of affix target demo

* fixs: misspell

* enhancement
  • Loading branch information
xueqingxiao authored and afc163 committed Sep 1, 2016
1 parent b798a22 commit 04e8f06
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions components/affix/demo/target.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
---
order: 4
title: 参考对象
title: 滚动容器
title:
zh-CN: 滚动容器
en-US: Container to scroll.
---

## zh-CN

`target` 设置 `Affix` 需要监听其滚动事件的元素,默认为 `window`

## en-US

Set a `target` for 'Affix', which is listen to scroll event of target element (default is `window`).

````jsx
import { Affix, Button } from 'antd';

Expand All @@ -17,7 +26,7 @@ const Demo = () => {
<br />
<br />
<Affix target={() => document.getElementById('affix-target')} offsetTop={20}>
<Button type="primary">固定在容器顶部</Button>
<Button type="primary">Fixed at the top of container</Button>
</Affix>
</div>
</div>
Expand Down

0 comments on commit 04e8f06

Please sign in to comment.