[英]Bootstrap carousel items get stacked on top of each other when window is re-sized
I am developing a carousel with Bootstrap which also needs to be responsive. 我正在使用Bootstrap开发旋转木马,它也需要响应。 It works pretty well when the
screen width
is bigger than 1200px
, but when it's lower the elements get stacked one above each other. 当
screen width
大于1200px
时,它可以1200px
,但是当screen width
小于1200px
时,元素彼此堆叠在一起。
This is the bootply with the code. 这是带有代码的bootply 。 What I would like to get is that the
items
are displayed on the same line and eventually if one of them overflows, it has to go on a new line. 我想得到的是,这些
items
显示在同一行上,最终如果其中一项溢出,则必须在新行上进行。
Does some of you have a suggestion of what I am doing wrong? 你们中有人对我做错了什么建议吗?
Thanks in advance for your replies! 提前感谢您的回复!
your element has col-lg-2 class which has float:left for media > 1200px. 您的元素具有col-lg-2类,对于媒体> 1200px,该类具有float:left。 anything less than that does not float left.
小于此的值将不浮动。 Add other classes for different devices such as col-xs-2, col-sm-2, col-md-2
为其他设备添加其他类,例如col-xs-2,col-sm-2,col-md-2
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.