【发布时间】:2020-02-29 15:12:25
【问题描述】:
如果我问的问题很愚蠢,请原谅我,但我需要创建一个以纯色为背景的整页滑块,左侧为一些文本,右侧为图像。像Google's Gmail Page 这样的东西。 目前我想要的结果是
我用过 Bootstrap 4 的 Carousel
我对其稍作修改,使其背景为灰色,与 Google 图像中的一样。现在我希望文本左对齐并在右侧有一个响应式自动调整大小的图像(或者即使我只能在文本顶部调整一个图像),这在移动设备上查看时也是响应式的。像
我正在使用this fiddle,我已将代码修改为
<div class="carousel-item" style="background-color: #eff0f1">
<div class="carousel-caption d-none d-md-block">
<h2 class="display-4">First Slide</h2>
<p class="lead">This is a description for the first slide.</p>
</div>
</div>
<style>
.carousel-item {
background-color: #eeeeee; /*Solid grey background*/
}
.carousel-caption {
color: black;
}
</style>
【问题讨论】:
标签: html css twitter-bootstrap responsive-design carousel