twitter-bootstrap Bootstrap 3.0 从左侧滑动菜单
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19041801/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Bootstrap 3.0 Sliding Menu from left
提问by Syl
I've implemented a sliding menu from left to right in my bootstrap 3.0 website using mmenu. However, the performances in Android (samsung galaxy) are not ideal. I also have a default collapsing menu (nav- dropdown) which perform much better.
我已经使用mmenu在我的引导程序 3.0 网站中实现了从左到右的滑动菜单。然而,在Android(三星galaxy)中的表现并不理想。我还有一个默认的折叠菜单(导航下拉菜单),它的性能要好得多。
I was wondering if any of you guys has a solution to improve the left menu ? Is there any Bootstrap 3.0 component that would do that and be as smooth as the default dropdown ? (couldn't find anything mentioned in the doc) ? or any other recommendation ?
我想知道你们中的任何人是否有改进左侧菜单的解决方案?是否有任何 Bootstrap 3.0 组件可以做到这一点并且与默认下拉菜单一样流畅?(找不到文档中提到的任何内容)?或任何其他建议?
回答by Marnix Harderwijk
I believe that although javascript is an option here, you have a smoother animation through forcing hardware accelerate with CSS3. You can achieve this by setting the following CSS3 properties on the moving div:
我相信虽然这里可以选择 javascript,但通过使用 CSS3 强制硬件加速,您可以获得更流畅的动画。您可以通过在移动 div 上设置以下 CSS3 属性来实现此目的:
div.hardware-accelarate {
-webkit-transform: translate3d(0,0,0);
-moz-transform: translate3d(0,0,0);
-ms-transform: translate3d(0,0,0);
-o-transform: translate3d(0,0,0);
transform: translate3d(0,0,0);
}
I've made a plunkrsetup for ya'll to test and tweak...
我已经为你们做了一个plunkr设置来测试和调整......
回答by Julien
Probably late but here is a plugin that can do the job : http://multi-level-push-menu.make.rs/
可能晚了,但这里有一个插件可以完成这项工作:http: //multi-level-push-menu.make.rs/
Also v2 can use mobile gesture such as swipe ;)
v2 也可以使用移动手势,例如滑动;)

