我刚刚下载了Bootstrap 4 alpha 2的源代码,但在里面找不到类。它存在于Bootstrap 3的源代码中,我可以在Notepad++中找到它,但在Bootstrap 4的文件(位于文件夹中)中不存在。
它到底发生了什么?
它到底发生了什么?
来自 Bootstrap 4 文档:
在 Bootstrap 中,使用 .img-fluid 样式可以使图片实现响应式布局。max-width: 100%; 和 height: auto; 样式将被应用到图片上,这样图片就可以随着父元素进行缩放。
Bootstrap 3:.img-responsive
Bootstrap 4:.img-fluid
就像Bootstrap 4 Images中所述:
在Bootstrap 4中,使用.img-fluid可以使图片具有响应性。max-width:100%;和height:auto;被应用于图像,以便它与父元素一起缩放。
<img class="img-fluid" src="" alt=""> //This will make your image responsive
<img src="..." class="img-fluid" alt="Responsive image">
img-fluid
代替img-responsive
吗? - Vahid Amiriimg-responsive
完全相同的样式。 - Boxiom