2015-06-09 120 views
0

有誰知道如何使引導酥料餅之上吧?引導酥料餅:對齊右上方

jsfiddle

$('.well').each(function() { 
    var $this = $(this); 

    $this.popover({ 
     placement: 'right', 
     html: true, 
     content: $this.find('.tip').html() 
    }) 
}); 

這就是我要做的:

enter image description here

取而代之的是:

enter image description here

我已經嘗試了很多的建議,但任何人都不幸工作。

+0

什麼*所有建議*你試過嗎? –

+0

難道你沒有一個代碼給我們看? –

+0

這裏是我的代碼:http://jsfiddle.net/brunodd/8tyxyfds/ – brunodd

回答

0

還有另外一個原因了。 Bootstrap有一個錯誤!更新Bootstrap CSS以使其工作。請點擊此處查看Fiddle


data-container="body"更改爲您的父母。你必須顯示你的代碼才能獲得幫助!在你的代碼,使用方法:

data-container="parent-selector" // Instead of the default! 

documentation說:

追加酥料餅到一個特定的元素。例如:容器:'body'。此選項,因爲它可以讓你的酥料餅在觸發元件附近的文檔流定位特別有用 - 這將防止酥料餅從一個窗口大小調整期間浮動從觸發單元分離。

<button type="button" class="btn btn-default" data-container="#idofparent" 
     data-toggle="popover" data-placement="top" 
     data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus."> 
    Popover on top 
</button> 
+0

這裏是我的代碼:http://jsfiddle.net/brunodd/8tyxyfds/ – brunodd

+0

@brunodd更新您的引導人... HTTP:// jsfiddle.net/8tyxyfds/2/ –

+0

是它的更新 – brunodd