[英]flex box with images in a row
I am using a bootstrap panel to display three images in a row. 我正在使用自举面板连续显示三个图像。 Suppose if I have six images in total, I want to display three in a row and the next three should come one by one as I move the scrollbar.
假设我总共有六个图像,我想连续显示三个图像,当我移动滚动条时,接下来的三个应该逐个显示。
For applying the scrollbar, I did overflow-x:visible
, but nothing is coming on the screen. 为了应用滚动条,我做了
overflow-x:visible
,但屏幕上没有任何内容。
Also, the fourth image is coming below the three images in a row. 此外,第四个图像连续位于三个图像的下方。
What should I do to make the images horizontally scrollable with three images getting displayed on the screen at a time? 我应该怎么做才能使图像水平滚动,同时三个图像一起显示在屏幕上?
Is this what you are looking for? 这是你想要的?
.container { display: flex; max-width: 225px; overflow-x: scroll; }
<div class="container"> <img src="http://placehold.it/75x50/000000"> <img src="http://placehold.it/75x50/ff0000"> <img src="http://placehold.it/75x50/333333"> <img src="http://placehold.it/75x50/00ff00"> <img src="http://placehold.it/75x50/666666"> <img src="http://placehold.it/75x50/0000ff"> </div>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.