Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 在引导中将窗口调整为移动大小_Javascript_Css_Twitter Bootstrap - Fatal编程技术网

Javascript 在引导中将窗口调整为移动大小

Javascript 在引导中将窗口调整为移动大小,javascript,css,twitter-bootstrap,Javascript,Css,Twitter Bootstrap,伙计们,我是bootstrap的初学者,我有那个代码 引导示例 第一个引导项目 阅读此链接上的导航栏部分。他们提供的代码示例在屏幕调整到手机大小时隐藏菜单 在移动视图上显示为按钮 <!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header"> <button type="button" clas

伙计们,我是bootstrap的初学者,我有那个代码


引导示例
第一个引导项目

阅读此链接上的导航栏部分。他们提供的代码示例在屏幕调整到手机大小时隐藏菜单

在移动视图上显示为按钮

 <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="#">Brand</a>
        </div>

切换导航

或者用这个来瘦身

试试这样的方法

function AdjustLayoutonResize() {
        windowWidth = $(window).width();
        windowHeight = $(window).height();
        fixedwidth = screenwidth;

     if (windowWidth <= fixedwidth) {
              $('#menus').css({ 'width': sliderwidth, 'display': none});
                }
                else {
                $('#menus').css({ 'width': sliderwidth, 'display': 'block' });
               }
             }
功能调整LayoutResize(){
windowWidth=$(window.width();
windowHeight=$(window.height();
固定宽度=屏幕宽度;

如果(windowWidth)您是否编写了任何
脚本来实现这一点?我尝试了$(window).调整大小,但没有解决..有什么建议吗?我建议您阅读引导部分。