Twitter Bootstrap Collapse plugin Direction—Horizontal instead of Vertical

前端 未结 7 587
孤城傲影
孤城傲影 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:01

    With bootstrap 3.0.0, you just need to add the width class to the target element and then the following css if you want it to animate.

    .collapse.width {
        height: auto;
        -webkit-transition: width 0.35s ease;
        -moz-transition: width 0.35s ease;
        -o-transition: width 0.35s ease;
        transition: width 0.35s ease;
    }
    

提交回复
热议问题