我这里有这个代码,目前我的旋转木马的图像跨越整个屏幕,我想让它的高度和宽度都很短,图像保持响应。我怎样才能达到这个效果。我正在使用bootstrap 4,只是为了清除它。
<style>
.carousel-item.active,
.carousel-item-next,
.carousel-item-prev {
display: block;
}
</style>
</head>
<body class="container-fluid">
<nav style="border:1px solid black;">
Navigation Space
</nav>
<!--CAROUSEL-->
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
</ol>
<!--Wrapper for Slides-->
<div class="carousel-inner">
<div class="carousel-item active">
<img src="images/car1.jpeg" alt="car1">
<div class="carousel-caption">
<h3>Making Data Available</h3>
<p>With 100% Accuracy</p>
</div>
</div>
<div class="carousel-item">
<img src="images/car2.jpeg" alt="car2" class="img-responsive">
</div>
<div class="carousel-item">
<img src="images/car3.jpeg" alt="car3">
</div>
</div>
<!--Left and Right Controls-->
<a class="carousel-control-prev" href="#myCarousel" data-slide="prev">
<span class="carousel-control-prev-icon"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#myCarousel" data-slide="next">
<span class="carousel-control-next-icon"></span>
<span class="sr-only">Next</span>
</a>
</div>