mirror of
https://gitee.com/antv/g6.git
synced 2024-12-15 18:11:08 +08:00
28 lines
441 B
Markdown
28 lines
441 B
Markdown
---
|
|
title: Legend
|
|
order: 9
|
|
---
|
|
|
|
Using contextMenu in G6.
|
|
|
|
## Usage
|
|
|
|
The demo below show how to use contextMenu on a graph. Menu's style can be defined by the CSS:
|
|
|
|
```css
|
|
/* Define the CSS with the id of your menu */
|
|
#contextMenu {
|
|
position: absolute;
|
|
/* ... Other styles */
|
|
}
|
|
#contextMenu li {
|
|
cursor: pointer;
|
|
/* ... Other styles */
|
|
}
|
|
#contextMenu li:hover {
|
|
color: #aaa;
|
|
/* ... Other styles */
|
|
}
|
|
`);
|
|
```
|