Twitter bootstrap 引导工具提示未显示在SVG悬停上

Twitter bootstrap 引导工具提示未显示在SVG悬停上,twitter-bootstrap,jquery-svg,Twitter Bootstrap,Jquery Svg,请看一下,让我知道为什么引导工具提示没有显示在这个svg上 这是我的密码 <div class="container"> <div class="well"> <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="200px" height=

请看一下,让我知道为什么引导工具提示没有显示在这个svg上

这是我的密码

<div class="container">
<div class="well">
   <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
     width="200px" height="200px" viewBox="0 0 200 200" enable-background="new 0 0 200  200" xml:space="preserve">
   <polygon  class="firststar" points="64.385,54.267 56.951,50.769 49.854,54.911 50.884,46.76 44.752,41.291 52.823,39.751 56.129,32.229 60.087,39.429 
68.262,40.249 62.639,46.239 "/>
  </svg>
</div>
</div>

原因是默认情况下,它会在svg中插入动态生成的工具提示div,这使得浏览器无法呈现它。而是使用选项中的
container
属性来设置boostrap生成的div需要放置的容器。见下面的例子:

$('.firststar').tooltip({title:'sometitle', container:'body'});
容器可以是任何非svg元素容器。在你的例子中说,
。好吧
,这样你就可以把它写成

$('.firststar').tooltip({title:'sometitle', container:'.well'});

请参见

谢谢PSL,因此我们必须始终传递诸如container:“body”之类的选项:我说得对吗?@MonaCoder欢迎您。您也可以提供任何其他容器。类似于
$('.firststar')。工具提示({title:'some title',container:'.well'})
$('.firststar').tooltip({title:'sometitle', container:'.well'});