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.

39 lines
758 B

# 位置
- order: 1
位置有四个方向。
---
````jsx
import { Popover, Button } from 'antd';
const text = <span>标题</span>;
const content = <div>
<p>内容</p>
10 years ago
<p>内容</p>
</div>;
9 years ago
ReactDOM.render(<div>
<Popover placement="left" title={text} overlay={content}>
<Button></Button>
</Popover>
<Popover placement="top" title={text} overlay={content}>
<Button></Button>
</Popover>
<Popover placement="bottom" title={text} overlay={content}>
<Button></Button>
</Popover>
<Popover placement="right" title={text} overlay={content}>
<Button></Button>
</Popover>
</div>, document.getElementById('components-popover-demo-placement'));
````
<style>
.code-box-demo .ant-btn {
margin-right: 1em;
}
</style>