twitter-bootstrap 如何加快 Bootstrap 导航栏中的移动下拉菜单?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/26378785/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 21:43:14  来源:igfitidea点击:

How can I speed up the mobile dropdown in the Bootstrap navbar?

javascriptcsstwitter-bootstrap

提问by TIMEX

On the mobile phone, there is a dropdown menu on the navbar. But it is far too slow.

在手机上,导航栏上有一个下拉菜单。但它太慢了。

Is it JQuery based? Or is it CSS transition based? How do I speed it up?

它是基于 JQuery 的吗?还是基于 CSS 转换?我如何加快速度?

回答by Tim

It is CSS transition based, try changing the height value from the transition property of this class.

它是基于 CSS 过渡的,尝试从此类的过渡属性更改高度值。

.collapsing {
  position: relative;
  height: 0;
  overflow: hidden;
  -webkit-transition: height .35s ease;
       -o-transition: height .35s ease;
          transition: height .35s ease;
}