2016-03-05 43 views
1

我想改變航向崩潰的顏色(背景和字體顏色):如何更改活動時的摺疊顏色?

http://jsfiddle.net/KbQyx/

如何讓這件事情?

<div class="panel-group" id="accordion"> 
    <div class="panel panel-default"> 
    <div class="panel-heading"> 
     <h4 class="panel-title"> 
     <a data-toggle="collapse" data-parent="#accordion" data-target="#collapseOne"> 
      Collapsible Group Item #1 
     </a> 
     </h4> 
    </div> 
    <div id="collapseOne" class="panel-collapse collapse in"> 
     <div class="panel-body"> 
     Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. 
     </div> 
    </div> 
    </div> 

</div> 
+0

在擺弄數據手風琴是在第一面板標籤,在別人

標籤,這是一個錯誤? – silviagreen

回答

0

我假設數據手風琴只在<h4>標籤中。

這裏是一個工作的解決方案:jsfiddle

.panel-default > .panel-heading > .panel-title.collapsed > a{ 
    color: #333; 
    background-color: #f5f5f5; 
    border-color: #ddd; 
    } 


.panel-default > .panel-heading > .panel-title:not(.collapsed) > a{ 
    color: #fff; 
    background-color: red; 
    border-color: red; 
    }