简体   繁体   中英

How to add an 'arrow' to the tooltip using the nvd3 tooltip

Is there any way I can add an arrow next to the nv.tooltip hover like the way the bootstrap has??

Eg: Bootstrap tooltip/popover

在此处输入图片说明

nvd3 tooltip:

在此处输入图片说明

You can use .nvtooltip:before and make a triangle using CSS. Check here

You can check demo here . Add the below styles in the CSS tab.

 .nvtooltip:before { 
    content: "";
    display: block;
    width: 0; 
    height: 0; 
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-right: 12px solid #d1d1d1; 
    position: absolute;
    top: 16px;
    left: -12px;
 }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM