0
我需要摺疊面板允許一次只摺疊一個面板。但是我的崩潰允許當時打開多個小組。Bootstrap 3摺疊 - 使摺疊只有一個面板
我不知道我在做什麼錯。 這裏是我的代碼:
<div class="col-lg-8 col-md-12 col-sm-12 col-xs-12">
<div class="panel-group" id="h-promocje" role="tablist" aria-multiselectable="true" style="">
<?php foreach ($promocje as $key => $promocja) { ?>
<div class="panel-default">
<a class="accordion-toggle collapsed" role="button" style="text-decoration:none !important;" data-toggle="collapse" data-parent="#h-promocje" href="#promocja<?=$key?>" aria-expanded="true" aria-controls="promocja<?=$key?>">
<div class="panel-heading" role="tab" id="h-promocja<?=$key?>" style="border-bottom: 1px solid white;padding-left: 0;padding-right: 0;">
<h4 class="panel-title" style="color:white;font-size:18px;font-weight:bold;text-transform: uppercase;padding-top: 4px; padding-bottom: 3px;text-align: left;">
<?=$promocja->tytul?>
</h4>
</div>
</a>
<div id="promocja<?=$key?>" class="panel-collapse collapse" role="tabpanel" aria-labelledby="promocja<?=$key?>">
<div class="panel-body">
<?=$promocja->opis?>
</div>
</div>
</div>
<?php } ?>
</div>
你可以發表小提琴嗎? – JesseEarley