Bootstrap 3平滑的手风琴转换

Nav*_*ker 9 jquery twitter-bootstrap

我正在使用Bootstrap 3手风琴.一切都很好,除了转换不顺利.这就像跳跃过渡.我怎样才能顺利过渡?

HTML

    <div class="panel" id="<?php echo $id; ?>">
        <div class="panel-title"><?php the_title(); ?></div>
        <div id="collapse-<?php echo $id; ?>" class="panel-collapse collapse" style="overflow:hidden; display: block;">
            <div class="panel-body"><?php the_content(); ?></div>
        </div>
        <a data-toggle="collapse" data-parent="#accordion" href="#collapse-<?php echo $id; ?>" class="collapsed read_more" id="btn-collapse-<?php echo $id; ?>">Read More &raquo;</a>
    </div>
Run Code Online (Sandbox Code Playgroud)

JS

$('.panel-collapse').on('shown.bs.collapse', function () {
    var collapse_id = $( this ).attr("id");
    $(".panel > #btn-"+collapse_id).text("Close");
});

$('.panel-collapse').on('hidden.bs.collapse', function () {
    var collapse_id = $( this ).attr("id");
    $(".panel > #btn-"+collapse_id).text("Read More");
});
Run Code Online (Sandbox Code Playgroud)

我确实关注了官方网站上的所有内容.

我尝试过的:

这个tranisiton CSS崩溃类

.panel .collapsing{
    height: 100px !important;
    -moz-transition : height 5s;
    -webkit-transition : height 5s;
    -o-transition : height 5s;
    transition : height 5s; 
}
Run Code Online (Sandbox Code Playgroud)

小智 22

只是更新过渡应该有效

.collapsing {
    transition: height 0.6s;
}
Run Code Online (Sandbox Code Playgroud)