gpt4 book ai didi

html - 制作一个可水平滚动的 Bootstrap 行

转载 作者:太空宇宙 更新时间:2023-11-04 10:44:56 24 4
gpt4 key购买 nike

我正在尝试在 boostrap 中制作一个滚动行。该行封装了 5 个或更多列,每个列都属于“col-sm-3”类。现在我不希望额外的列折叠到下一行,而是它们应该保持隐藏状态直到滚动。有人可以帮助实现这一目标吗?这是代码,请看simi

<!-- listings -->
<div class="col-sm-10">

<div class="row" style="overflow-x:visible; overflow-y:hidden; display:inline-block;">
<div class="col-sm-3">
<div class="affiliate-frame text-center" id="product1">
<a href="#">
<img alt="" class="square-frame" src="images/product1-market.jpg">
</a>

<div class="padd-top-10 font-size-14">Casual T Shirt Black</div>

<div class="padd-top-10 "><a href="#" class="lnk-affiliates"> AED 225 </a>
</div>
<div class="padd-top-10 ">
<a href="#" class="lnk-affiliates"> <strong> Dubai, UAE </strong>
</a>
</div>
</div>
<!-- affiliate frame -->
</div>

<div class="col-sm-3">
<div class="affiliate-frame text-center" id="product1">
<a href="#">
<img alt="" class="square-frame" src="images/product1-market.jpg">
</a>

<div class="padd-top-10 font-size-14">Casual T Shirt Black</div>

<div class="padd-top-10 "><a href="#" class="lnk-affiliates"> AED 225 </a>
</div>
<div class="padd-top-10 ">
<a href="#" class="lnk-affiliates"> <strong> Dubai, UAE </strong>
</a>
</div>
</div>
<!-- affiliate frame -->
</div>

<div class="col-sm-3">
<div class="affiliate-frame text-center" id="product1">
<a href="#">
<img alt="" class="square-frame" src="images/product1-market.jpg">
</a>

<div class="padd-top-10 font-size-14">Casual T Shirt Black</div>

<div class="padd-top-10 "><a href="#" class="lnk-affiliates"> AED 225 </a>
</div>
<div class="padd-top-10 ">
<a href="#" class="lnk-affiliates"> <strong> Dubai, UAE </strong>
</a>
</div>
</div>
<!-- affiliate frame -->
</div>

<div class="col-sm-3">
<div class="affiliate-frame text-center" id="product1">
<a href="#">
<img alt="" class="square-frame" src="images/product1-market.jpg">
</a>

<div class="padd-top-10 font-size-14">Casual T Shirt Black</div>

<div class="padd-top-10 "><a href="#" class="lnk-affiliates"> AED 225 </a>
</div>
<div class="padd-top-10 ">
<a href="#" class="lnk-affiliates"> <strong> Dubai, UAE </strong>
</a>
</div>
</div>
<!-- affiliate frame -->
</div>

<div class="col-sm-3">
<div class="affiliate-frame text-center" id="product1">
<a href="#">
<img alt="" class="square-frame" src="images/product1-market.jpg">
</a>

<div class="padd-top-10 font-size-14">Casual T Shirt Black</div>

<div class="padd-top-10 "><a href="#" class="lnk-affiliates"> AED 225 </a>
</div>
<div class="padd-top-10 ">
<a href="#" class="lnk-affiliates"> <strong> Dubai, UAE </strong>
</a>
</div>
</div>
<!-- affiliate frame -->
</div>
</div>

</div>
<!-- listings -->

最佳答案

需要在容器上使用 white-space:nowrap 并且在每列上使用 float:none;display:inline-block

https://jsfiddle.net/g8138wjo/2/

关于html - 制作一个可水平滚动的 Bootstrap 行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35495401/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com