我正在使用引导在我的服务器端web应用程序。为了调整大屏幕的图像大小,我给了一些填充,这样它就不会变大了。
这是一种调整图像大小的好方法,还是应该使用其他方法?
<section class="pt-8 pt-md-11">
<div class="container">
<div class="row">
<div class="col-12 col-md-6 order-md-2 px-md-5 px-lg-9">
<img src="/img/myimage.pnh" class="img-fluid mb-6 mb-md-0" alt="">
</div>
<div class="col-12 col-md-6 order-md-1 text-center text-md-left">
<h2 class="display-3 font-weight-bold ">Save the World</h2>
<p class="text-muted">It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters</p>
</div>
</div>
</div>
</section>发布于 2022-06-30 08:45:50
“img-流体”级是:
.img-fluid {
max-width: 100%;
height: auto;
}所以重点是最大宽度。你应该把它设置成一个你想防止img变大的数字。
https://stackoverflow.com/questions/72783029
复制相似问题