2013-07-19 78 views
2

我使用引導程序tooltips,但我似乎無法弄清楚如何創建像例子site這樣的酷酷的css透明工具提示。我只是顯示爲灰色的工具提示。Css風格的透明工具提示?

我可以通過標記屬性設置樣式,還是必須通過jquery/js來做到這一點,如果是這樣?

<a href="#" data-toggle="tooltip" title="tooltip">tooltip</a> 

Bootply - >http://www.bootply.com/68686

+0

您使用的是什麼瀏覽器?它應該工作正常。 – gustavohenke

+0

@gustavohenke http://www.bootply.com/68686 – JaJ

回答

1

按照Bootstrap docs

For performance reasons, the tooltip and popover data-apis are opt in, meaning you must initialize them yourself. 

那是因爲你可能有很多在頁面提示,有什麼能殺死表現

所以,基本上,你需要把你的JS是:

$("[data-toggle='tooltip']").tooltip();