请您看一下这个JsFiddle,告诉我如何在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="400px" height="400px" viewBox="0 0 400 400" enable-background="new 0 0 400 400" xml:space="preserve">
<ellipse class="firststar" cx="200" cy="200" rx="150" ry="150"/>
</svg>
</div>
</div>
并且jQuery代码:
$('.firststar').tooltip({title:'Test SVG Centering', container:'.well', placement: 'top'});