【问题标题】:How to set the CSS styles of the image to fit bootstrap width如何设置图像的 CSS 样式以适应引导宽度
【发布时间】:2014-03-14 00:11:53
【问题描述】:

如何设置图像的 CSS 样式,使其适合引导 6 列可用的全宽并相应地缩放高度

  <div class="col-xs-6">
    <img src="the_image.jpg" class="my_image_style">          
  </div>

谢谢!

【问题讨论】:

    标签: css twitter-bootstrap height width


    【解决方案1】:

    您可以使用 boostrap img-responsive 类。

    <div class="row">
      <div class="col-xs-6">
        <img src="http://placehold.it/1000x100" class="img-responsive">
      </div>
    </div>
    

    这是一个示例bootply

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-05-02
      • 2016-02-29
      • 2016-08-24
      • 2013-10-16
      • 2012-06-20
      • 2022-11-30
      • 2017-07-13
      相关资源
      最近更新 更多