You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
597 B
29 lines
597 B
8 years ago
|
---
|
||
|
order: 2
|
||
|
title: 箭头指向
|
||
|
---
|
||
|
|
||
|
设置了 `arrowPointAtCenter` 后,箭头将指向目标元素的中心。
|
||
|
|
||
|
````jsx
|
||
|
import { Tooltip, Button } from 'antd';
|
||
|
|
||
|
ReactDOM.render(
|
||
|
<div>
|
||
|
<Tooltip placement="topLeft" title="提示文字 提示文字">
|
||
|
<Button>默认对齐元素边缘</Button>
|
||
|
</Tooltip>
|
||
|
<Tooltip placement="topLeft" title="提示文字 提示文字" arrowPointAtCenter>
|
||
|
<Button>箭头指向目标元素的中心</Button>
|
||
|
</Tooltip>
|
||
|
</div>
|
||
|
, mountNode);
|
||
|
````
|
||
|
|
||
|
<style>
|
||
|
.code-box-demo .ant-btn {
|
||
|
margin-right: 1em;
|
||
|
margin-bottom: 1em;
|
||
|
}
|
||
|
</style>
|