![](/img/trans.png)
[英]How do I change the background-color of an accordion tab in Bootstrap?
[英]How to change the Bootstrap accordion panel heading/title background color when the accordion collapses and is open
這是在折疊並打開手風琴時需要更改背景顏色的代碼: http : //www.bootply.com/cherylbbb/COm6fikZKx
如何更改CSS以設置背景顏色變化的樣式?
提前非常感謝您!
您可以通過CSS與panel-heading
和collapsed
類一起玩來實現。 Par示例將這些行添加到您的css:
/* set panel-heading paddings to a instead of h3 */
.panel-heading { padding: 0 }
.panel-heading h3 { background: #bbf; }
.panel-heading a { padding: 10px 15px; }
/* change color of collapsed class */
.collapsed { background: #fbb; }
/* reposition the left arrows */
.panel-heading .accordion-toggle.collapsed:after { top: 10px; }
.panel-heading .accordion-toggle:after { top: 10px; }
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.