Twitter Bootstrap 100% height accordion “jump”

后端 未结 4 1048
北荒
北荒 2021-02-14 01:18

I\'m trying to implement a 100% height accordion using the Twitter Bootstrap collapse component, exactly as described in this question.

I\'m manually setting the heights

4条回答
  •  忘掉有多难
    2021-02-14 01:52

    I was having this weird behavior where the accordion would expand to a much larger height than the actual visible content, and then collapse (jump) back to the actual visible content height.

    Turns out that my accordion body for that panel had a few empty html elements, which, in my case were a few divs with col-sm-4 class and nothing inside them. Once I commented them out this jumping behavior stopped. Hope this helps someone with similar problem.

提交回复
热议问题