国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

在行動(dòng)裝置上自訂 Bootstrap 5 輪播(多個(gè)項(xiàng)目,但不在一行)
P粉763662390
P粉763662390 2023-09-05 11:53:56
0
1
720
<p>我在嘗試自訂行動(dòng)裝置上的輪播佈局時(shí)遇到問(wèn)題。 我希望它在行動(dòng)裝置上顯示輪播的每一項(xiàng),而不是只顯示一項(xiàng),但在嘗試使用一些CSS 和JS 之後,尤其是使用<code>display</code> <code>float< /code> 或<code>max-witdh</code> 我剛開(kāi)始認(rèn)為這是不可能的,或者我不知道在哪裡查看/查看錯(cuò)誤的位置/屬性。 我加入了兩張圖片,這樣你們就可以看到我想要實(shí)現(xiàn)的目標(biāo)。 </p> <p>我想要實(shí)現(xiàn)的目標(biāo): </p> <p>我有什麼: </p> <p>範(fàn)例 html 程式碼是非?;镜某淌酱a,我不包括 CSS,因?yàn)檫@只是出於設(shè)計(jì)目的。 </p> <pre class="brush:php;toolbar:false;"><div id="solutions-carousel" class="carousel slide d-block d-md-none"> <div class="carousel-inner"> <div class="carousel-item active"> <a href="#" class="img-link"><img src="./img.png" alt=""></a> <a href="#">text</a> </div> <div class="carousel-item"> <a href="#" class="img-link"><img src="./img.png" alt=""></a> <a href="#">text</a> </div> <div class="carousel-item active"> <a href="#" class="img-link"><img src="./img.png" alt=""></a> <a href="#">text</a> </div> <div class="carousel-item active"> <a href="#" class="img-link"><img src="./img.png" alt=""></a> <a href="#">text</a> </div> <div class="carousel-item active"> <a href="#" class="img-link"><img src="./img.png" alt=""></a> <a href="#">text</a> </div> <div class="carousel-indicators"> <按鈕類(lèi)型=“按鈕” data-bs-target=“#solutions-carousel” data-bs-slide-to=“0”類(lèi)別=“活躍” aria-current=“真” aria-label="幻燈片 1"</button> <按鈕類(lèi)型=“按鈕” data-bs-target=“#solutions-carousel” data-bs-slide-to=“1” aria-label=“幻燈片 2”> <按鈕類(lèi)型=“按鈕” data-bs-target=“#solutions-carousel” data-bs-slide-to=“2” aria-label="幻燈片 3"</button> <按鈕類(lèi)型=“按鈕” data-bs-target=“#solutions-carousel” data-bs-slide-to=“3” aria-label="幻燈片 3"</button> <按鈕類(lèi)型=“按鈕” data-bs-target=“#solutions-carousel” data-bs-slide-to=“4” aria-label="幻燈片 3"</button> </div></pre> <p>有想法嗎?乾杯意(書(shū)面上用英文表示抱歉)。</p>
P粉763662390
P粉763662390

全部回覆(1)
P粉029057928

我認(rèn)為類(lèi)似的問(wèn)題和案例之前已經(jīng)在另一個(gè)線程中得到了答案。我找到了一些可能對(duì)您有幫助的參考資料,我會(huì)給您一些連結(jié)。 stackoverflow 中的另一個(gè)執(zhí)行緒

您也可以使用以下 JS 程式碼:

$('.multi-item-carousel').carousel({
  interval: false
});

// for every slide in carousel, copy the next slide's item in the slide.
// Do the same for the next, next item.
$('.multi-item-carousel .item').each(function(){
  var next = $(this).next();
  if (!next.length) {
    next = $(this).siblings(':first');
  }
  next.children(':first-child').clone().appendTo($(this));
  
  if (next.next().length>0) {
    next.next().children(':first-child').clone().appendTo($(this));
  } else {
    $(this).siblings(':first').children(':first-child').clone().appendTo($(this));
  }
});

免責(zé)聲明:這些答案/程式碼片段不是我的。我從 Maurice melchers 的 https://codepen.io/mephysto/pen/ZYVKRY 得到它

最新下載
更多>
網(wǎng)站特效
網(wǎng)站源碼
網(wǎng)站素材
前端模板