首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >通过为带引导带4的大屏幕提供一些填充来调整图像大小

通过为带引导带4的大屏幕提供一些填充来调整图像大小
EN

Stack Overflow用户
提问于 2022-06-28 08:20:15
回答 1查看 35关注 0票数 0

我正在使用引导在我的服务器端web应用程序。为了调整大屏幕的图像大小,我给了一些填充,这样它就不会变大了。

这是一种调整图像大小的好方法,还是应该使用其他方法?

代码语言:javascript
复制
<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>
EN

回答 1

Stack Overflow用户

发布于 2022-06-30 08:45:50

“img-流体”级是:

代码语言:javascript
复制
.img-fluid {
   max-width: 100%;
   height: auto;
}

所以重点是最大宽度。你应该把它设置成一个你想防止img变大的数字。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72783029

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档