简体   繁体   English

手机上的Bootstrap Grid

[英]Bootstrap Grid on mobile

Grid sistem doesn`t work on mobile: .col-xs-3 is on full screen, col-xs-3 works like col-xs-12, any ideias? 网格系统在移动设备上不起作用:.col-xs-3在全屏上运行,col-xs-3像col-xs-12一样工作,有什么想法吗?

 <div class="container"> <div class="row"> <div class="col-md-1 col-xs-3"> <a href="#"> <img src="/.." /> </a> </div> <div class="col-md-1 col-xs-3"> <a href="#"> <img src="/.." /> </a> </div> <div class="col-md-1 col-xs-3"> <a href="#"> <img src="/.." /> </a> </div> ... </div> </div> 

1) If the bootstrap version your are using is 4, In bootstrap 4 there is no xs breakpoint. 1)如果您使用的引导程序版本是4,则在引导程序4中没有xs断点。 Instead the xs breakpoint is the default and for other breakpoints you must use breakpoints. 相反,xs断点是默认断点,对于其他断点,必须使用断点。 so for example if you want 3 on mobile and 1 on md and above you must say 因此,例如,如果您想在移动设备上使用3,在md及以上版本上使用1,则必须说

col-3 col-md-1

2) Please do check that the required meta tags is on the head section of your code ie 2)请确保所需的元标记位于代码的头部,即

<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

您确定引导程序已链接并且您在移动设备上使用chrome吗?

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM