简体   繁体   English

html 侧边栏不会在 767px 和 785px 之间崩溃,我该如何解决?

[英]html sidebar won't collapse between 767px and 785px,how do i fix it?

I'm using ADMINLTE to build a website and have a page that it sidebar won't collapse between 767 pixel and 785 pixel other pages have no problem, so i inspect my page and compare the working page shows the below classes我正在使用 ADMINLTE 建立一个网站,并且有一个页面,它的侧边栏不会在 767 像素和 785 像素之间折叠其他页面没有问题,所以我检查我的页面并比较工作页面显示以下类

class='skin-blue sidebar-mini sidebar-collapse' and class='skin-blue sidebar-mini' class='skin-blue sidebar-mini sidebar-collapse'class='skin-blue sidebar-mini'

and the problem page is 'skin-blue sidebar-mini sidebar-open' and 'skin-blue sidebar-mini'问题页面是“skin-blue sidebar-mini sidebar-open”和“skin-blue sidebar-mini”

and i check this is the part causes the issues when the iterate more than 4我检查这是迭代超过 4 次时导致问题的部分

 for ($x = 0; $x <= 4; $x++){

        ?>
        <div class="col-lg-2 col-md-3 col-xs-6">  
        <form method="post">  
        <div style="border:1px solid #3c8dbc; background-color:#f1f1f1; border-radius:5px; padding:4px 4px; margin-top:10px; margin-right:-11px; margin-left:-11px;" align="center" onClick="document.forms[''].submit();" >  
        <img class="menu_m_img" src="dist/img/<?php echo $row["name"]; ?>" /><br />  
        <h4 class="text-info" style="font-size:12px;"><?php echo mb_strimwidth($row["name"], 0, 18, "...");?></h4>
        <h4 class="text-danger">RM<?php echo $row["name_id"]; ?></h4>                   

        <input type="submit" name="add_to_cart" style="border:none; color:#fff; border-radius:5px;
        background-repeat:no-repeat; width:100%" value="Add to Cart" class="btn btn-primary" />                                 
        </div>  
        </form>  
        </div>  
        <?php  
        }
        }else{?>
        <table class="table table-condensed" id="table" style ="margin-top:10px;">
        <td colspan="4" align="center">No results found</td>
        </table>                        
        <?php 
        }                                   
        ?>

why is this happens and how do i solve this?为什么会发生这种情况,我该如何解决? and may i know how it change the class when i press the button, how it add collapse or -open at class?我可以知道当我按下按钮时它如何改变 class,它如何在 class 添加折叠或打开?

If you have sidebar-open as body class, it means you pressed the button and want the sidebar to be open.如果您将sidebar-open为主体 class,则表示您按下了按钮并希望侧边栏打开。 I don't know how you got it there.我不知道你是怎么弄到那里的。 You con programatically remove it with $('body').removeClass('sidebar-open');您可以使用$('body').removeClass('sidebar-open');以编程方式将其删除. .

tried at other machine, problem not recreated, it only occur in my devices, so for those have this problem try at others devices first...在其他机器上试过,问题没有重现,它只发生在我的设备上,所以对于那些有这个问题的人先在其他设备上尝试......

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么媒体查询不适用于 0px 和 767px 之间的范围? - Why media query is not working to the range between 0px and 767px? 如果屏幕小于 767px (jQuery),则隐藏特定的 HTML 元素 - Hide specific HTML element if screen is smaller than 767px (jQuery) 屏幕尺寸达到767px时,无法在html和js中添加显示对象 - Having problems adding a display object in html and js, when screen-size gets to 767px 绝对定位的子项应与其父项的大小相同,因为我在 320 像素和 767 像素屏幕宽度之间调整屏幕大小 - Absolute positioned child should be at the same size as its parent as im resizing the screen between 320px and 767px screen width 当我突破767px宽度时,Bootstrap 3删除了填充/边距 - Bootstrap 3 removes padding/margin when I break under 767px width 宽度大于767像素,启用插件? - javascript - enable a plugin if width is greater than 767px? 在 767px 屏幕中居中对齐绝对定位图标 - Center align absolute positioned icon in 767px screen 宽度小于767像素时如何从DIV中删除左边界 - How to remove left margin from DIV when below 767px width 如何使用媒体查询的最大宽度:首先使用Bootstrap 4移动版的767px - How to use media query for max-width: 767px using Bootstrap 4 mobile first Twitter Bootstrap:如何不将列缩放到767px以下的单行 - Twitter Bootstrap: how to not scale columns to single row under 767px
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM