在移动分辨率下,carousel项目向下移动
输入图像描述
输入图片描述
<div class="container">
<div id="carouselExampleCaptions" class="carousel slide" data-bs-ride="false">
<div class="carousel-indicators">
<button type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button>
<button type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide-to="1" aria-label="Slide 2"></button>
</div>
<div class="carousel-inner">[enter image description here][1]
<div class="carousel-item active">
<img src="/img/banner 1.png" class="d-block w-100" alt="banner 1">
<div class="carousel-caption d-md-block">
<h5>Velocida</h5>
<p>Coleta e entrega rápida de encomendas.</p>
<button type="button" class="btn btn-light">Serviços</button>
</div>
</div>
<div class="carousel-item">
<img src="img/banner 2.png" class="d-block w-100" alt="banner 2">
<div class="carousel-caption d-md-block">
<h5>Segurança</h5>
<p>A logística ideal para levar seus pedidos com segurança.</p>
<button type="button" class="btn btn-light">Serviços</button>
</div>
</div>
</div>
这是你想要的吗?
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js"></script>
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
</ol>
<div class="carousel-inner">
<div class="carousel-item active">
<img class="d-block w-100" src="https://picsum.photos/200/100" class="d-block w-100" alt="First slide">
<div class="carousel-caption d-md-block">
<h5>Velocida</h5>
<p>Coleta e entrega rápida de encomendas.</p>
<button type="button" class="btn btn-light">Serviços</button>
</div>
</div>
<div class="carousel-item">
<img class="d-block w-100" src="https://picsum.photos/200/100" class="d-block w-100" alt="Second slide">
<div class="carousel-caption d-md-block">
<h5>Segurança</h5>
<p>A logística ideal para levar seus pedidos com segurança.</p>
<button type="button" class="btn btn-light">Serviços</button>
</div>
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>