如何更改工具提示背景颜色,工具提示显示在 td

How to change the tool tip background color, tooltip displays in td

我有一个它在鼠标悬停时显示工具提示,现在我想更改工具提示的背景颜色。 有什么方法可以使用 CSS 或 JQuery 或使用 class 属性

<td title="#487105 CLASSIC LOOSE RD124473 ENGINEERED 2X1-" class="tooltip" rowspan="10" style="white-space:nowrap;">

尝试在你的 td 中实现这个:

<table border="2px">
   <tr>
     <td data-toggle="tooltip" data-placement="bottom"
       title="" data-original-title="Tooltip on bottom"
       class="red-tooltip">Tooltip on bottom
     </td>
   </tr>
</table>

你可以参考这个: http://jsfiddle.net/ckxSs/585/

You can use jQuery Plugin or pure css based customised tooltip.

one of the way is below mentioned.

**Include**

jQuery 

 **Inside td keep like this**
    <a href="#" data-toggle="tooltip" data-placement="bottom"
       title="" data-original-title="Tooltip on bottom"
       class="red-tooltip">#487105 CLASSIC LOOSE RD124473 ENGINEERED 2X1-</a> 
**CSS**

.red-tooltip + .tooltip > .tooltip-inner {background-color: #f00;}

**JS**

$(document).ready(function(){
    $("a").tooltip();
});

查看示例 - http://jsfiddle.net/ckxSs/16/

我想您会喜欢看到这个 link 用于在 jqueryUi 中自定义工具提示:

https://jqueryui.com/tooltip/#custom-style

希望对您有所帮助。

谢谢!!