2014-08-27 99 views
3

(對不起,我不擅長英語)引導拆分按鈕下拉大小不相同

Image of Button's dropdown icon not aligning

我想使按鈕的大小相同。但它不一樣大小。

如何讓它的大小相同?

<div class="filter pull-right" style="padding:8px"> 
<!-- Split button --> 
<div class="btn-group"> 
    <button type="button" class="btn btn-danger">Action</button> 
    <button type="button" class="btn btn-danger" data-toggle="dropdown"> 
    <span class="caret"></span> 
    <span class="sr-only">Toggle Dropdown</span> 
    </button> 
    <ul class="dropdown-menu" role="menu"> 
    <li><a href="#">Action</a></li> 
    <li><a href="#">Another action</a></li> 
    <li><a href="#">Something else here</a></li> 
    <li class="divider"></li> 
    <li><a href="#">Separated link</a></li> 
    </ul> 
</div> 
</div> 

`

+2

你可以發佈你正在使用的代碼,你曾經嘗試過什麼,以及你想看到什麼。謝謝! – serakfalcon 2014-08-27 07:50:54

+0

請顯示您使用的代碼。 – 2014-08-27 08:11:06

回答

1

試試這個:

使用btn-group

<div class="btn-group"> 
      <button type="button" class="btn btn-danger">Action</button> 
      <button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown"> 
       &nbsp; 
       <span class="caret"></span> 
       <span class="sr-only">Toggle Dropdown</span> 
      </button> 
      <ul class="dropdown-menu" role="menu"> 
       <li><a href="#">Action</a></li> 
       <li><a href="#">Another action</a></li> 
       <li><a href="#">Something else here</a></li> 
       <li class="divider"></li> 
      </ul> 
     </div> 
+0

我已經輸入了這段代碼。 – ryush00 2014-08-27 11:59:27

+0

你的代碼工作正常 – 2014-08-27 12:15:02

+0

沒有..不幸的是它沒有工作。請幫幫我。 [鏈接](http://minelist.kr) – ryush00 2014-08-27 12:22:21

3

的問題實際上是不相關的按鈕的代碼或缺失的空間。

缺少的是文檔開頭的HTML標籤。

在這裏,您看到左側的按鈕,右側沒有附加的&nbsp;和另外的&nbsp;。右側的按鈕有點不對稱。

no html tag

Boostrap documentation將在你的文檔驗證碼:

<!DOCTYPE html> 
<html lang="en"> 
    ... 
</html> 

您將結束與這樣的按鈕: with html tag