mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-27 12:39:49 +08:00
docs: add watermark faq (#50307)
This commit is contained in:
parent
6c6111a62c
commit
dd3bfae425
@ -77,3 +77,11 @@ When using an image watermark and the image loads abnormally, you can add `conte
|
||||
<div style={{ height: 500 }} />
|
||||
</Watermark>
|
||||
```
|
||||
|
||||
### Why `overflow: hidden` style is added since version 5.18.0?
|
||||
|
||||
User can hide the watermark by setting the container height to 0 through the developer tool in the previous version. To avoid this situation, we added the `overflow: hidden` style to the container. When the container height changes, the content is also hidden. You can override the style to modify this behavior:
|
||||
|
||||
```tsx
|
||||
<Watermark style={{ overflow: 'visible' }} />
|
||||
```
|
||||
|
@ -78,3 +78,11 @@ tag: 5.1.0
|
||||
<div style={{ height: 500 }} />
|
||||
</Watermark>
|
||||
```
|
||||
|
||||
### 从 5.18.0 版本后,为什么添加了 `overflow: hidden` 样式?
|
||||
|
||||
在之前版本,用户可以通过开发者工具将容器高度设置为 0 来隐藏水印,为了避免这种情况,我们在容器上添加了 `overflow: hidden` 样式。当容器高度变化时,则内容也一同被隐藏。你可以通过覆盖样式来修改这个行为:
|
||||
|
||||
```tsx
|
||||
<Watermark style={{ overflow: 'visible' }} />
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user