antd-vue里a-toopltip气泡框样式背景颜色的改变

本文介绍如何使用 Antd-Vue 1.7.8 版本自定义气泡框的样式,包括背景颜色及小三角颜色的设置方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 <a-tooltip
       placement="right"
         title="气泡框内内容"
         :get-popup-container="getPopupContainer"
         :overlayStyle="{ width: '32%' }"
          overlayClassName="popover" >
             显示气泡框   
  </a-tooltip>
 

//style内
//气泡框背景颜色
/deep/.ant-tooltip-inner {
  background-color: #84929d;
  color: #ffffff;
}
//小三角的颜色
/deep/ .ant-tooltip-arrow::before {
  background-color: #84929d;
}

antd-vue是1.7.8版本

如果不成功

可以试试 不加scoped  不加deep