css - 为什么 Bootstrap 4 轮播自动裁剪图像的高度?
问题描述
我正在使用 Bootstrap 4 轮播,我需要轮播显示 image 的完整高度。
我不知道为什么 boostrap 会降低它的高度
尺寸为 1920 x 700,轮播调整图像 1900 x 595
我在 curvy-slider (wordpress) 中看到了相同的图像,而这个插件不这样做。
<div id="carousel-area">
<div id="carousel-slider" class=" slide" data-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active">
<img class="img-responsive" src="/data/1.jpg" alt="" >
</div>
</div>
</div>
</div>
有人可以帮助我吗?
解决方案
Bootstrap 应该适应不同高度的图像,除非在某处为轮播设置了特定的高度。
#myCarousel img {
width: auto;
height: 225px;
max-height: 225px;
}
从:
https://forums.adobe.com/thread/2413998
你可以在这里看到:
https://bootstrapcreative.com/create-full-width-bootstrap-4-responsive-carousel/
推荐阅读
- python - 来自不同数据集的节点属性
- haskell - Haskell - 我如何在 IO 函数中使用 Maybe
- asp.net-core - 如何将用户声明从专用身份 API 传递到 ASP.NET 核心中的内部 API?
- python-3.x - 如何对三元组损失函数的掩码计算进行矢量化
- python - 使用 def 函数和 defaultdict 计算特定单词
- c++ - 如何 ”?” 使函数更短。(C++?)
- python - 如何为 Nano 文本编辑器制作文本操纵器(在 Python 中)
- django - 如何为 django 中的每个数据插入一个新行?
- python - ValueError:无法将 NumPy 数组转换为张量(不支持的对象类型生成器)
- flutter - Flutter单击Navigator.push,即使我关闭应用程序,视频也会继续播放