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

房东的猫 提交于 2020-01-16 04:21:47

问题


i have a it shows the tootltip while mouse over, now i would like to change the background color of the tooltip. is there any way of using CSS or JQuery or using class attribute

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


回答1:


I think you would love to see this link for customizing tooltip in jqueryUi:

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

Hope this may help you.

Thanks!!




回答2:


Try Implementing this in your 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>

You could refer this: http://jsfiddle.net/ckxSs/585/




回答3:


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();
});

View Example - http://jsfiddle.net/ckxSs/16/



来源:https://stackoverflow.com/questions/29764989/how-to-change-the-tool-tip-background-color-tooltip-displays-in-td

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!