Bootstrap 4 Carousel小图像尺寸

时间:2019-12-11 14:38:08

标签: html css bootstrap-4 carousel bootstrap-carousel

大家好,大家好 这是我对StackOverflow的第一个问题,因此请耐心等待。 我在移动设备上的bootstrap 4上有一个旋转木马,它可以正确缩放(我希望它从头到尾在屏幕上显示),但是在Full HD或更高分辨率的台式机/笔记本电脑上,它可以正确加载图像,然后立即使图片变小并且看起来可怕。该网站为https:\ splitvet.com(您必须在Full HD或更优质的笔记本电脑/ PC上打开它)。

修改我的外部CSS并没有做任何事情,我试图做我在互联网上发现的所有事情(不同的类等等)

请帮助并表示感谢:)

P.S。这不是整个页面的代码,这仅仅是与我的问题有关的东西,在启动3的同时,最后的代码也很好,我重写了此代码以适应新的启动4的规则。

<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
</head>

<body>
<div class="container-fluid">

<div class="row row-fluid form-group" style="margin-top: 0px;">
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<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>
<li data-target="#myCarousel" data-slide-to="3"></li>
<li data-target="#myCarousel" data-slide-to="4"></li>
<li data-target="#myCarousel" data-slide-to="5"></li>
<li data-target="#myCarousel" data-slide-to="6"></li>
<li data-target="#myCarousel" data-slide-to="7"></li>
<li data-target="#myCarousel" data-slide-to="8"></li>
<li data-target="#myCarousel" data-slide-to="9"></li>
</ol>

<div class="carousel-inner">
<div class="carousel-item active">
<picture><img class="d-block w-100 image-fluid mr-auto"src="Pictures\Banner2.webp"></picture>      
</div>
<div class="carousel-item">
        <picture><img class="d-block w-100 image-fluid mr-auto" src="Pictures\IMG_2143.webp"></picture>
</div>
<div class="carousel-item">
        <picture><img class="d-block w-100 image-fluid mr-auto" src="Pictures\IMG_2144.webp"></picture>
</div>
<div class="carousel-item">
        <picture><img class="d-block w-100 image-fluid mr-auto" src="Pictures\IMG_2153.webp"></picture>
</div>
<div class="carousel-item">
        <picture><img class="d-block w-100 image-fluid mr-auto" src="Pictures\IMG_2155.webp"></picture>
</div>
<div class="carousel-item">
        <picture><img class="d-block w-100 image-fluid mr-auto" src="Pictures\IMG_2163.webp"></picture>
</div>
<div class="carousel-item">
        <picture><img class="d-block w-100 image-fluid mr-auto" src="Pictures\IMG_2168.webp"></picture>
</div>
<div class="carousel-item">
        <picture><img class="d-block w-100 image-fluid mr-auto" src="Pictures\IMG_2170.webp"></picture>
</div>
<div class="carousel-item">
        <picture><img class="d-block w-100 image-fluid mr-auto" src="Pictures\IMG_2180.webp"></picture>
</div>
<div class="carousel-item">
        <picture><img class="d-block w-100 image-fluid mr-auto" src="Pictures\IMG_2182.webp"></picture>
</div>
</div>

<!-- Left and right controls -->
<a class="carousel-control-prev" href="#myCarousel" role="button" data-slide="prev">
        <span class="carousel-control-prev-icon" aria-hidden="true"></span>
        <span class="sr-only">Previous</span>
      </a>
<a class="carousel-control-next" href="#myCarousel" role="button" data-slide="next">
        <span class="carousel-control-next-icon" aria-hidden="true"></span>
        <span class="sr-only">Next</span>
      </a>
</div>

</div>
</div>
</body>

0 个答案:

没有答案