2016-04-20 54 views

回答

2

2部分答案:

  1. 李克特 - 使用禁用.btn-link任一側
<div class="btn-toolbar" role="toolbar" aria-label="..."> 
     <div class="btn-group" role="group" aria-label="..."> 
     <a class="btn btn-link disabled" disabled>Safe</a> 
     <button type="button" class="btn btn-default likert-1">1</button> 
     <button type="button" class="btn btn-default likert-2">2</button> 
     <button type="button" class="btn btn-default likert-3">3</button> 
     <button type="button" class="btn btn-default likert-4">4</button> 
     <button type="button" class="btn btn-default likert-5">5</button> 
     <a class="btn btn-link disabled" disabled>Dangerous</a> 
     </div> 
    </div> 
  • 顏色 - 只是覆蓋 '.btn' 着色:
  • .btn.likert-1 { background-color: darkgreen; color: yellow; } 
        .btn.likert-2 { background-color: lightgreen; color: brown; } 
        .btn.likert-3 { background-color: yellow; color: brown; } 
        .btn.likert-4 { background-color: orange; color: white; } 
        .btn.likert-5 { background-color: red; color: white; } 
        /* Choose better colors tho! */ 
    

    查看此JSFiddle爲例。

    +0

    謝謝!現在我試圖通過使用與$(「。btn btn-default」)類似的東西來提醒()用戶選擇用戶。click(function(){})但是它似乎不工作。我錯過了什麼? –

    +0

    查看關於[崩潰](http://getbootstrap.com/javascript/#collapse)js。 – Vino