mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 07:56:28 +08:00
docs: add affix's FAQ (#30775)
* docs: add affix's FAQ * docs: update affix's FAQ * docs: update affix's FAQ
This commit is contained in:
parent
d35cdc09a7
commit
b2bdaf5134
@ -35,3 +35,9 @@ Please note that Affix should not cover other content on the page, especially wh
|
||||
We don't listen window scroll for performance consideration. You can add listener if you still want: <https://codesandbox.io/s/2xyj5zr85p>
|
||||
|
||||
Related issues:[#3938](https://github.com/ant-design/ant-design/issues/3938) [#5642](https://github.com/ant-design/ant-design/issues/5642) [#16120](https://github.com/ant-design/ant-design/issues/16120)
|
||||
|
||||
### When Affix is used in a horizontal scroll container, the position of the element `left` is incorrect.
|
||||
|
||||
Affix is generally only applicable to areas with one-way scrolling, and only supports use in vertical scrolling containers. If you want to use it in a horizontal container, you can consider using the native `position: sticky` implementation.
|
||||
|
||||
Related issues:[#29108](https://github.com/ant-design/ant-design/issues/29108)
|
||||
|
@ -36,3 +36,9 @@ cover: https://gw.alipayobjects.com/zos/alicdn/tX6-md4H6/Affix.svg
|
||||
从性能角度考虑,我们只监听容器滚动事件。如果希望任意滚动,你可以在窗体添加滚动监听:<https://codesandbox.io/s/2xyj5zr85p>
|
||||
|
||||
相关 issue:[#3938](https://github.com/ant-design/ant-design/issues/3938) [#5642](https://github.com/ant-design/ant-design/issues/5642) [#16120](https://github.com/ant-design/ant-design/issues/16120)
|
||||
|
||||
### Affix 在水平滚动容器中使用时, 元素 `left` 位置不正确。
|
||||
|
||||
Affix 一般只适用于单向滚动的区域,只支持在垂直滚动容器中使用。如果希望在水平容器中使用,你可以考虑使用 原生 `position: sticky` 实现。
|
||||
|
||||
相关 issue: [#29108](https://github.com/ant-design/ant-design/issues/29108)
|
||||
|
Loading…
Reference in New Issue
Block a user