http://getbootstrap.com/javascript/#collapse http://getbootstrap.com/javascript/#collapse
有没有办法让这个菜单从左向右滑动?我环顾四周并没有看到太多,但我想知道是否有人有更多的见解。
首先,在所有 Twitter Bootstrap CSS 之后定义以下 CSS:
.collapse {
height: auto;
width: auto;
}
.collapse.height {
position: relative;
height: 0;
overflow: hidden;
-webkit-transition: height 0.35s ease;
-moz-transition: height 0.35s ease;
-o-transition: height 0.35s ease;
transition: height 0.35s ease;
}
.collapse.width {
position: relative;
width: 0;
overflow: hidden;
-webkit-transition: width 0.35s ease;
-moz-transition: width 0.35s ease;
-o-transition: width 0.35s ease;
transition: width 0.35s ease;
}
.collapse.in.width {
width: auto;
}
.collapse.in.height {
height: auto;
}
接下来,在目标元素(定义 .collapse 类的位置)上,您需要添加 .width 或 .height 类,具体取决于您想要设置动画的属性。
最后,如果对宽度进行动画处理,则必须包装目标元素的内容并显式定义其宽度。如果对高度进行动画处理则不需要这样做。
Twitter Bootstrap Collapse 插件方向 - 水平而不是垂直 https://stackoverflow.com/questions/12498476/twitter-bootstrap-collapse-plugin-direction
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)