美文网首页
bootstrap响应式图片

bootstrap响应式图片

作者: Ancestor楠 | 来源:发表于2020-07-14 14:11 被阅读0次

    响应式图片 img-responsive

    等比例缩放

    网址:https://v3.bootcss.com/css/#images

    在 Bootstrap 版本 3 中,通过为图片添加 .img-responsive 类可以让图片支持响应式布局。其实质是为图片设置了 max-width: 100%;、 height: auto; 和 display: block; 属性,从而让图片在其父元素中更好的缩放。

    如果需要让使用了 .img-responsive 类的图片水平居中,请使用 .center-block 类,不要用 .text-center。

    栅格12-3+9

    相关文章

      网友评论

          本文标题:bootstrap响应式图片

          本文链接:https://www.haomeiwen.com/subject/ulwxhktx.html