如何在HTML标题中添加css

时间:2015-03-16 14:22:32

标签: jquery html css

我正在为我的数据填充使用数据表。我正在使用标题工具提示标题。但是我可以使用css吗? 就像我试过的那样

#mainTable title {  
  font-weight: bold;
  font-size : 30px;
  color:red;
}

我希望在

中的表头中使用css
 var createTable = '<table id="mainTable" class="display"><thead><tr><th title="Starting date of the period in which the activity occurred.">Period Starting</th><th title=Intelligence(Milestone)>Intelligence</th><th title=Engaged(Milestone)>Engaged</th><th>Qualification</th><th>Internal Submission</th><th>Present</th><th>Interviewed</th><th>Support</th><th>Placement</th></tr></thead><tbody>';

无论如何我能实现吗?

2 个答案:

答案 0 :(得分:1)

简短的回答:你不能。

答案很长:您可以创建自己的工具提示弹出框,您可以使用jss控制css。你可以编写自己的,或使用许多可用的插件之一。

答案 1 :(得分:0)

您可以尝试:

    .ui-tooltip-content {  
      font-weight: bold;
      font-size : 30px;
      color:red;
    }

假设我已经正确地阅读了这个问题?