【发布时间】:2019-10-17 18:14:40
【问题描述】:
我需要一个移动图像,里面有变化的图像(滑动);所以我认为由另一个图像覆盖的 Bootstrap 轮播应该可以完成这项工作。
下面是我的代码,但是有两个问题(响应式调整大小),因为我使用的是绝对定位,所以当前部分会覆盖下一部分。
<section>
<h2 style="text-align: center;">Online Dashboard</h2>
<div class="row" style="margin: 50px 0;">
<div class="col-6" align="center">
<div class="carousel slide" data-ride="carousel" style="position: absolute; left: 0; height: 100px; width: 50px;">
<div class="carousel-inner">
<div class="carousel-item active" data-interval="1000">
<img src="resources/assets/images/oneplus6_phone_blue_screen.png" style="height: 100px;">
</div>
<div class="carousel-item" data-interval="1000">
<img src="resources/assets/images/oneplus6_phone_red_screen.png" style="height: 100px;">
</div>
</div>
<img src="resources/assets/images/oneplus6_phone.png" style="position: absolute; top: 0; left: 0; height: 100px;">
</div>
</div>
</section>
<section>
<div class="row align-items-center justify-content-center">
<div class="col-lg-4">
<h2>We love brainstorming ideas!</h2>
<a href="mailto:info@example.com?Subject=Website-Contact%20Form" target="_top"><button type="button" class="btn btn-outline-danger heartbeat">Contact Us!</button></a>
</div>
</div>
</section>
【问题讨论】:
-
请发布完整代码
-
嗨发布完整代码片段 - @Luke Galea
-
大家好,我添加了代码的下一部分,这对我来说似乎是唯一相关的部分。即我认为其他部分,如页脚、正文等不应该影响这个 sn-p。
标签: html css image bootstrap-4