Twitter Bootstrap Collapse plugin Direction—Horizontal instead of Vertical

前端 未结 7 594
孤城傲影
孤城傲影 2020-11-28 07:27

Is there a way to collapse the the Bootstrap Collapse plugin from horizontally instead of vertically? Looking at the code this ability doesn\'t seem to be built in, but I\'m

7条回答
  •  孤独总比滥情好
    2020-11-28 08:10

    In my version of bootstrap 3 (using LESS), I simply had to include this in my global less file:

    .collapsing.width  { 
        width: 0;
        height: auto;
        .transition(width 0.35s ease);
    }
    

    The extra class has to be width since the collapse.js looks for this class for the transition. I tried everyone else's suggestions, but they didn't work for me.

提交回复
热议问题