Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/36.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 引导img响应类和缩略图类之间有什么区别?_Html_Css_Twitter Bootstrap_Twitter Bootstrap 3 - Fatal编程技术网

Html 引导img响应类和缩略图类之间有什么区别?

Html 引导img响应类和缩略图类之间有什么区别?,html,css,twitter-bootstrap,twitter-bootstrap-3,Html,Css,Twitter Bootstrap,Twitter Bootstrap 3,我在两个不同的项目中都使用了这两种方法,但我似乎看不出两者之间的区别。img的反应似乎是一个但混乱,但我仍然不知道他们到底做什么,他们如何不同 :class=“缩略图” :class=“img responsive”该.img responsive类将最大宽度:100%、高度:自动和显示:块应用于图像,从而有效地使其缩放到其父容器的宽度 .img thumbnail类将样式应用于包含填充和边框的图像。img responsive类将最大宽度:100%、高度:自动和显示:块应用于图像,从而有效地使

我在两个不同的项目中都使用了这两种方法,但我似乎看不出两者之间的区别。img的反应似乎是一个但混乱,但我仍然不知道他们到底做什么,他们如何不同

class=“缩略图”


class=“img responsive”

该.img responsive类将最大宽度:100%、高度:自动和显示:块应用于图像,从而有效地使其缩放到其父容器的宽度


.img thumbnail类将样式应用于包含填充和边框的图像。img responsive类将最大宽度:100%、高度:自动和显示:块应用于图像,从而有效地使其缩放到其父容器的宽度


.img缩略图类将样式应用于图像,包括填充和边框,来自引导源代码:

.img-responsive {
    display: inline-block;
    height: auto;
    max-width: 100%;
}

.thumbnail {
  display: block;
  padding: 4px;
  margin-bottom: 20px;
  line-height: 1.42857143;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  -webkit-transition: border .2s ease-in-out;
       -o-transition: border .2s ease-in-out;
          transition: border .2s ease-in-out;
}

从引导源代码:

.img-responsive {
    display: inline-block;
    height: auto;
    max-width: 100%;
}

.thumbnail {
  display: block;
  padding: 4px;
  margin-bottom: 20px;
  line-height: 1.42857143;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  -webkit-transition: border .2s ease-in-out;
       -o-transition: border .2s ease-in-out;
          transition: border .2s ease-in-out;
}