gpt4 book ai didi

javascript - shift bootstrap carousel 标题中心向右

转载 作者:行者123 更新时间:2023-11-28 06:18:32 25 4
gpt4 key购买 nike

我正在尝试将 Bootstrap 轮播标题中心向右移动。我目前只有常规的 Bootstrap 代码。我只设法找到将它一直转移到顶部的解决方案。任何帮助将不胜感激。

  <div id="carousel1" class="carousel slide" data-ride="carousel" style="width:100%;">
<ol class="carousel-indicators">
<li data-target="#carousel1" data-slide-to="0" class="0"></li>
<li data-target="#carousel1" data-slide-to="1"></li>
</ol>
<div class="carousel-inner">
<div class="item active">
<img src="/wp-content/themes/creativeforces/images/preschool.jpg" class="img-responsive" alt="" style="width:100%;">
<div class="carousel-caption">
<div class="inner-caption">
<h3>Image1</h3>
<p>This is image one for carousel</p>
</div>
</div>
</div>
<div class="item">
<img src="/wp-content/themes/creativeforces/images/kid.jpg" class="img-responsive" alt="" style="width:100%;">

<div class="carousel-caption">
<div class="inner-caption">
<h3>Image1</h3>
<p>This is image one for carousel</p>
</div>
</div>
</div>
</div>
<a href="#carousel1" class="left carousel-control" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
</a>
<a href="#carousel1" class="right carousel-control" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
</a>
</div>

这是现在的样子 This is what it currently looks like这就是我想要的样子 This is what I want it to look like

最佳答案

您需要修改您的 CSS,请尝试以下代码。

.carousel-caption {
right: 20%;
left: auto;
padding-bottom: 30px;
width: 250px;
background: rgba(0,0,0,0.5);
top: 50%;
border-radius: 18px;
bottom: auto;
}

关于javascript - shift bootstrap carousel 标题中心向右,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35746898/

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