html - 如何使用 z-index 或任何其他方法在引导轮播中定位元素?
问题描述
我想要实现的输出是这样的, 示例图像
我尝试使用 z-index 和定位,但我无法实现输出。我的工作
我被以下内容困住了,无法将见证人图像一半移动到背景内部,一半移动到背景之外。
这是我的 HTML 代码,
<section id="testimonials">
<div class="container-fluid">
<h2 class="medium-title">What they’ve said</h1>
<div id="testimonial-slider" class="carousel slide" data-ride="true">
<div class="carousel-inner">
<div class="carousel-item active">
<img class="testimonial-image" src="https://ibb.co/Y38pJpk" alt="Anisha Li">
<h6>Anisha Li</h6>
<p class="testimonial-text">“Manage has supercharged our team’s workflow. The ability to maintain
visibility on larger milestones at all times keeps everyone motivated.”</p>
</div>
<div class="carousel-item">
<img class="testimonial-image" src="images/avatar-ali.png" alt="Ali Bravo">
<h6>Ali Bravo</h6>
<p>“We have been able to cancel so many other subscriptions since using
Manage. There is no more cross-channel confusion and everyone is much
more focused.”</p>
</div>
<div class="carousel-item">
<img class="testimonial-image" src="images/avatar-richard.png" alt="Richard Watts">
<h6>Richard Watts</h6>
<p>“Manage allows us to provide structure and process. It keeps us organized
and focused. I can’t stop recommending them to everyone I talk to!”</p>
</div>
<div class="carousel-item">
<img class="testimonial-image" src="images/avatar-shanai.png" alt="Shanai Gough">
<h6>Shanai Gough</h6>
<p>“Their software allows us to track, manage and collaborate on our projects
from anywhere. It keeps the whole team in-sync without being intrusive.”</p>
</div>
</div>
<a class="carousel-control-prev" href="#testimonial-slider" role="button" data-slide="prev">
<span class="carousel-control-prev-icon"></span>
</a>
<a class="carousel-control-next" href="#testimonial-slider" role="button" data-slide="next">
<span class="carousel-control-next-icon"></span>
</a>
</div>
<button class="btn button-red" type="button" name="button">Get Started</button>
</div>
如何改变图像的位置?
Codeply 链接:https ://www.codeply.com/p/PbBtENblHD
只是为了方便环顾四周。
解决方案
我找到了解决方案。'carousel-inner' 类溢出:隐藏;属性,所以图像被隐藏了。对于所有刚接触引导程序的人,如果您遇到类似的问题,请务必检查默认引导程序类的溢出属性。
推荐阅读
- java - 使用spring boot,JPA通过引用关联实体
- networking - 寻找一种方法来确定为什么离开我的集群的数据包会保留它的 pod IP
- sqlite - Python3 | SQL 请求失败
- java - 我如何在 VSCode 上安装 junit 5
- ios - 如何在 numberofitemsinsection 中管理两个不同的单元格
- php - php - 在时事通讯退订链接中使用 UUID 是否足够安全?
- javascript - AnuglarJS 中的数独
- database - 解决关于卡片的数据库设计
- javascript - d.source 是什么?[文档是指自己]
- c# - 如何在查询中获得多个结果?